public static < T extends Annotation > T getAnnotation ( Field field , Class < T > annotationType ) { return field . getAnnotation ( annotationType ) == null ? getAnnotationFromReadMethod ( getReadMethod ( field ) . orElse ( null ) , annotationType ) : field . getAnnotation ( annotationType ) ; }
Looks for given annotationType on given field or read method for field .