GenericDeclaration { public static GenericDeclaration parseFrom(@Nonnull final String typeDeclaration) { Check.notNull(typeDeclaration, "typeDeclaration"); final Matcher m = PATTERN.matcher(typeDeclaration); return m.matches() && m.group(4) != null ? GenericDeclaration.of(m.group(4)) : GenericDeclaration.UNDEFINED; } private  GenericDeclaration(); private  GenericDeclaration(@Nonnull final String declaration); static GenericDeclaration of(@Nonnull final String declaration); static GenericDeclaration parseFrom(@Nonnull final String typeDeclaration); @Override boolean equals(final Object obj); String getDeclaration(); @Override int hashCode(); boolean isUndefined(); @Override String toString(); static final GenericDeclaration UNDEFINED; }
@Test public void parseFrom_wrongDefinition() { assertSame(GenericDeclaration.UNDEFINED, GenericDeclaration.parseFrom("<T extends Annotation> T")); }