Class AnnotableAndModifiableExtension


  • public class AnnotableAndModifiableExtension
    extends Object
    • Constructor Detail

      • AnnotableAndModifiableExtension

        public AnnotableAndModifiableExtension()
    • Method Detail

      • makePrivate

        public static void makePrivate​(AnnotableAndModifiable me)
        Sets the visibility of this element to private.
      • makePublic

        public static void makePublic​(AnnotableAndModifiable me)
        Sets the visibility of this element to public.
      • makeProtected

        public static void makeProtected​(AnnotableAndModifiable me)
        Sets the visibility of this element to protected.
      • removeAllModifiers

        public static void removeAllModifiers​(AnnotableAndModifiable me)
        Removes all modifiers from this element.
      • addModifier

        public static void addModifier​(AnnotableAndModifiable me,
                                       Modifier newModifier)
        Adds the given type of modifier to this element. This method does not check for duplicate modifiers!
        Parameters:
        newModifier - the modifier to add
      • removeModifier

        public static void removeModifier​(AnnotableAndModifiable me,
                                          Class<?> modifierType)
        Removes the given type of modifier from this element.
        Parameters:
        modifierType -
      • hasModifier

        public static boolean hasModifier​(AnnotableAndModifiable me,
                                          Class<?> type)
        Checks whether this element has an modifier of the given type.
        Parameters:
        type -
      • isStatic

        public static boolean isStatic​(AnnotableAndModifiable me)
        Returns true if this element is static (either by an explicit modifier static or because this element is part of an interface).