Class AnnotableAndModifiableExtension

java.lang.Object
tools.mdsd.jamopp.model.java.extensions.modifiers.AnnotableAndModifiableExtension

public final class AnnotableAndModifiableExtension extends Object
  • Method Details

    • makePrivate

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

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

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

      public static void removeAllModifiers(AnnotableAndModifiable annotableAndModifiable)
      Removes all modifiers from this element.
    • getModifiers

      public static EList<Modifier> getModifiers(AnnotableAndModifiable annotableAndModifiable)
      Returns an unmodifiable list of the modifiers that apply to this element.
    • getAnnotationInstances

      public static EList<AnnotationInstance> getAnnotationInstances(AnnotableAndModifiable annotableAndModifiable)
      Returns an unmodifiable list of the annotations that apply to this element.
    • addModifier

      public static void addModifier(AnnotableAndModifiable annotableAndModifiable, 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 annotableAndModifiable, Class<?> modifierType)
      Removes the given type of modifier from this element.
      Parameters:
      modifierType -
    • isPublic

      public static boolean isPublic(AnnotableAndModifiable annotableAndModifiable)
    • isPrivate

      public static boolean isPrivate(AnnotableAndModifiable annotableAndModifiable)
    • isProtected

      public static boolean isProtected(AnnotableAndModifiable annotableAndModifiable)
    • hasModifier

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

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

      public static boolean isHidden(AnnotableAndModifiable annotableAndModifiable, Commentable context)