Class AnnotationUtils

    • Method Detail

      • isFieldDeprecated

        public static boolean isFieldDeprecated​(Class<?> _class,
                                                String fieldName)
        Check if a field is annotated with @Deprecated in the provided class. Mostly used on elements of an Enum but will also work on class Field (private and public).
        Returns:
        true if the specified field is annotated with @Deprecated on the provided class. False is all other cases (including if the field doesn't exist)