List of usage examples for java.lang.reflect AccessibleObject getDeclaredAnnotations
public Annotation[] getDeclaredAnnotations()
From source file:com.anrisoftware.globalpom.reflection.annotations.AnnotationDiscoveryImpl.java
private Set<AnnotationBean> findAnnotations(Set<AnnotationBean> result, Object bean, List<? extends AccessibleObject> members) { for (AccessibleObject member : members) { Annotation[] annotations = member.getDeclaredAnnotations(); findAnnotations(result, member, bean, annotations); }/*from www . jav a2 s . co m*/ return result; }
From source file:com.yahoo.elide.core.EntityDictionary.java
/** * Returns annotations applied to the ID field. * * @param value the value//from w ww . ja v a2 s . com * @return Collection of Annotations */ public Collection<Annotation> getIdAnnotations(Object value) { if (value == null) { return null; } AccessibleObject idField = entityBinding(value.getClass()).getIdField(); if (idField != null) { return Arrays.asList(idField.getDeclaredAnnotations()); } return Collections.emptyList(); }