public static boolean isJava5DeclarationElementType(FieldDoc elt) {
        return elt.name().contentEquals(ElementType.ANNOTATION_TYPE.name()) ||
                elt.name().contentEquals(ElementType.CONSTRUCTOR.name()) ||
                elt.name().contentEquals(ElementType.FIELD.name()) ||
                elt.name().contentEquals(ElementType.LOCAL_VARIABLE.name()) ||
                elt.name().contentEquals(ElementType.METHOD.name()) ||
                elt.name().contentEquals(ElementType.PACKAGE.name()) ||
                elt.name().contentEquals(ElementType.PARAMETER.name()) ||
                elt.name().contentEquals(ElementType.TYPE.name());
    }
public static boolean isJava5DeclarationElementType ( FieldDoc elt ) { return elt . name ( ) . contentEquals ( ElementType . ANNOTATION_TYPE . name ( ) ) || elt . name ( ) . contentEquals ( ElementType . CONSTRUCTOR . name ( ) ) || elt . name ( ) . contentEquals ( ElementType . FIELD . name ( ) ) || elt . name ( ) . contentEquals ( ElementType . LOCAL_VARIABLE . name ( ) ) || elt . name ( ) . contentEquals ( ElementType . METHOD . name ( ) ) || elt . name ( ) . contentEquals ( ElementType . PACKAGE . name ( ) ) || elt . name ( ) . contentEquals ( ElementType . PARAMETER . name ( ) ) || elt . name ( ) . contentEquals ( ElementType . TYPE . name ( ) ) ; }
Test whether the given FieldDoc is one of the declaration annotation ElementTypes
defined in Java 5.
Instead of testing for one of the new enum constants added in Java 8, test for
the old constants. This prevents bootstrapping problems.

@param elt The FieldDoc to test
@return true, iff the given ElementType is one of the constants defined in Java 5
@since 1.8