Interface CtModifiable

    • Method Detail

      • getModifiers

        Set<ModifierKind> getModifiers()
        Returns the modifiers of this element, excluding annotations. Implicit modifiers, such as the public and static modifiers of interface members, are included.
        Returns:
        the modifiers of this declaration in undefined order; an empty set if there are none
      • hasModifier

        boolean hasModifier​(ModifierKind modifier)
        Tells if this element contains the given modifier.
        Parameters:
        modifier - to search
        Returns:
        true if this element contain the modifier
      • removeModifier

        <T extends CtModifiable> T removeModifier​(ModifierKind modifier)
        remove a modifier
        Parameters:
        modifier -
      • setVisibility

        <T extends CtModifiable> T setVisibility​(ModifierKind visibility)
        Sets the visibility of this modifiable element (replaces old visibility).
      • getVisibility

        ModifierKind getVisibility()
        Gets the visibility of this modifiable element.
      • getExtendedModifiers

        Set<CtExtendedModifier> getExtendedModifiers()
        Returns:
        the set of extended modifiers (those incl. implicit).
      • isSynchronized

        boolean isSynchronized()
        Returns true if it contains a synchronized modifier (see hasModifier(ModifierKind))