@Override public <A extends Annotation> A getAnnotation(Class<A> acls) { return (_annotated == null) ? null : _annotated.getAnnotation(acls); }
@Override public <A extends Annotation> A getAnnotation(Class<A> acls) { return _annotated.getAnnotation(acls); }
private List<Descriptor> createJacksonDescriptor(String name, Class<?> type) { List<Descriptor> descriptors = new ArrayList<Descriptor>(); for (BeanPropertyDefinition definition : new JacksonMetadata(mapper, type)) { AnnotatedMethod getter = definition.getGetter(); Description description = getter.getAnnotation(Description.class); ResourceDescription fallback = SimpleResourceDescription .defaultFor(String.format("%s.%s", name, definition.getName())); ResourceDescription resourceDescription = description == null ? null : new AnnotationBasedResourceDescription(description, fallback); descriptors.add(// descriptor().// name(definition.getName()).// type(Type.SEMANTIC).// doc(getDocFor(resourceDescription)).// build()); } return descriptors; }
@Override public <A extends Annotation> A getAnnotation(Class<A> acls) { return _annotated.getAnnotation(acls); }
@Override public <A extends Annotation> A getAnnotation(Class<A> acls) { return _annotated.getAnnotation(acls); }
@Override public <A extends Annotation> A getAnnotation(Class<A> acls) { return _annotated.getAnnotation(acls); }
@Override public <A extends Annotation> A getAnnotation(Class<A> acls) { return _annotated.getAnnotation(acls); }
@Override public <A extends Annotation> A getAnnotation(Class<A> acls) { return _annotated.getAnnotation(acls); }
@Override public <A extends Annotation> A getAnnotation(Class<A> acls) { return (_annotated == null) ? null : _annotated.getAnnotation(acls); }
@Override public <A extends Annotation> A getAnnotation(Class<A> acls) { return _annotated.getAnnotation(acls); }
@Override public <A extends Annotation> A getAnnotation(Class<A> acls) { return _annotated.getAnnotation(acls); }
@Override public <A extends Annotation> A getAnnotation(Class<A> acls) { return _annotated.getAnnotation(acls); }
@Override public <A extends Annotation> A getAnnotation(Class<A> acls) { return _annotated.getAnnotation(acls); }
@Override public boolean hasAsValueAnnotation(AnnotatedMethod am) { JsonValue ann = am.getAnnotation(JsonValue.class); // value of 'false' means disabled... return (ann != null && ann.value()); }
@Override public boolean hasAsValueAnnotation(AnnotatedMethod am) { JsonValue ann = am.getAnnotation(JsonValue.class); // value of 'false' means disabled... return (ann != null && ann.value()); }
@SuppressWarnings("PMD") private static <A extends Annotation> Optional<A> tryGetGetterAnnotation( BeanPropertyDefinition beanPropertyDefinition, Class<A> annotationClass) { if (beanPropertyDefinition.hasGetter()) { return Optional.fromNullable(beanPropertyDefinition.getGetter().getAnnotation(annotationClass)); } return Optional.absent(); }
XmlID idProp = m.getAnnotation(XmlID.class); if (idProp == null) { continue;
@SuppressWarnings("PMD") private static <A extends Annotation> Optional<A> tryGetSetterAnnotation( BeanPropertyDefinition beanPropertyDefinition, Class<A> annotationClass) { try { if (beanPropertyDefinition.hasSetter()) { return Optional.fromNullable(beanPropertyDefinition.getSetter().getAnnotation(annotationClass)); } } catch (IllegalArgumentException ignored) { } return Optional.absent(); } @SuppressWarnings("PMD")
@SuppressWarnings("PMD") private static <A extends Annotation> Optional<A> tryGetSetterAnnotation( BeanPropertyDefinition beanPropertyDefinition, Class<A> annotationClass) { if (beanPropertyDefinition.hasSetter()) { return Optional.fromNullable(beanPropertyDefinition.getSetter().getAnnotation(annotationClass)); } return Optional.absent(); }
@SuppressWarnings("PMD") private static <A extends Annotation> Optional<A> tryGetGetterAnnotation( BeanPropertyDefinition beanPropertyDefinition, Class<A> annotationClass) { try { if (beanPropertyDefinition.hasGetter()) { return Optional.fromNullable(beanPropertyDefinition.getGetter().getAnnotation(annotationClass)); } } catch (IllegalArgumentException ignored) { } return Optional.absent(); } @SuppressWarnings("PMD")