@Test public void noAnnotation() throws Exception { JerseyJaxRsEntity entity = new JerseyJaxRsEntity(NoAnnotation.class, null); Optional<Ignore> annotations = entity.getAnnotation(Ignore.class); assertFalse(annotations.isPresent()); }
@Override public <T extends Annotation> Optional<T> getAnnotation(Class<T> annotationType) { Class castClass = Cast.toClass(input); return (Optional<T>) Optional.fromNullable(castClass.getAnnotation(annotationType)); }
JerseyJaxRsEntity implements JaxRsEntity { @Override public <T extends Annotation> Optional<T> getAnnotation(Class<T> annotationType) { Class castClass = Cast.toClass(input); return (Optional<T>) Optional.fromNullable(castClass.getAnnotation(annotationType)); } }
JerseyJaxRsEntity implements JaxRsEntity { @Override public <T extends Annotation> Optional<T> getAnnotation(Class<T> annotationType) { Class castClass = Cast.toClass(input); return (Optional<T>) Optional.fromNullable(castClass.getAnnotation(annotationType)); } JerseyJaxRsEntity(Type input, SourceParser sourceParser); }
JerseyJaxRsEntity implements JaxRsEntity { @Override public <T extends Annotation> Optional<T> getAnnotation(Class<T> annotationType) { Class castClass = Cast.toClass(input); return (Optional<T>) Optional.fromNullable(castClass.getAnnotation(annotationType)); } JerseyJaxRsEntity(Type input, SourceParser sourceParser); @Override Type getType(); @Override Optional<String> getDescription(); @Override JaxRsEntity createJaxRsEntity(Type type); @Override Optional<T> getAnnotation(Class<T> annotationType); }
JerseyJaxRsEntity implements JaxRsEntity { @Override public <T extends Annotation> Optional<T> getAnnotation(Class<T> annotationType) { Class castClass = Cast.toClass(input); return (Optional<T>) Optional.fromNullable(castClass.getAnnotation(annotationType)); } JerseyJaxRsEntity(Type input, SourceParser sourceParser); @Override Type getType(); @Override Optional<String> getDescription(); @Override JaxRsEntity createJaxRsEntity(Type type); @Override Optional<T> getAnnotation(Class<T> annotationType);  }