public static boolean isAnnotationPresent ( Field field , Class < ? extends Annotation > annotationType ) { final Optional < Method > readMethod = getReadMethod ( field ) ; return field . isAnnotationPresent ( annotationType ) || readMethod . isPresent ( ) && readMethod . get ( ) . isAnnotationPresent ( annotationType ) ; }
Checks if field or corresponding read method is annotated with given annotationType .