Interface AccessNode

    • Method Detail

      • getModifiers

        default @NonNull ASTModifierList getModifiers()
        Returns the node representing the modifier list of this node.
      • getVisibility

        default AccessNode.Visibility getVisibility()
        Returns the visibility corresponding to the effective modifiers. Eg a public method will have visibility public, a local class will have visibility local. There cannot be any conflict with hasModifiers(JModifier, JModifier...)} on well-formed code (e.g. for any n, (n.getVisibility() == V_PROTECTED) == n.hasModifiers(PROTECTED))

        TODO a public method of a private class can be considered to be private we could probably add another method later on that takes this into account

      • getEffectiveVisibility

        default AccessNode.Visibility getEffectiveVisibility()
        Returns the "effective" visibility of a member. This is the minimum visibility of its enclosing type declarations. For example, a public method of a private class is "effectively private".

        Local declarations keep local visibility, eg a local variable somewhere in an anonymous class doesn't get anonymous visibility.

      • hasModifiers

        default boolean hasModifiers​(JModifier mod1,
                                     JModifier... mod)
        Returns true if this node has all the given modifiers either explicitly written or inferred through context.
      • hasExplicitModifiers

        default boolean hasExplicitModifiers​(JModifier mod1,
                                             JModifier... mod)
        Returns true if this node has all the given modifiers explicitly written in the source.
      • isFinal

        @Deprecated
        default boolean isFinal()
        Deprecated.
      • isAbstract

        @Deprecated
        default boolean isAbstract()
        Deprecated.
      • isStrictfp

        @Deprecated
        default boolean isStrictfp()
        Deprecated.
      • isSynchronized

        @Deprecated
        default boolean isSynchronized()
        Deprecated.
      • isNative

        @Deprecated
        default boolean isNative()
        Deprecated.
      • isStatic

        @Deprecated
        default boolean isStatic()
        Deprecated.
      • isVolatile

        @Deprecated
        default boolean isVolatile()
        Deprecated.
      • isTransient

        @Deprecated
        default boolean isTransient()
        Deprecated.
      • isPrivate

        @Deprecated
        default boolean isPrivate()
        Deprecated.
      • isPublic

        @Deprecated
        default boolean isPublic()
        Deprecated.
      • isProtected

        @Deprecated
        default boolean isProtected()
        Deprecated.
      • isPackagePrivate

        @Deprecated
        default boolean isPackagePrivate()
        Deprecated.
      • isSyntacticallyAbstract

        @Deprecated
        default boolean isSyntacticallyAbstract()
        Deprecated.
      • isSyntacticallyPublic

        @Deprecated
        default boolean isSyntacticallyPublic()
        Deprecated.
      • isSyntacticallyStatic

        @Deprecated
        default boolean isSyntacticallyStatic()
        Deprecated.
      • isSyntacticallyFinal

        @Deprecated
        default boolean isSyntacticallyFinal()
        Deprecated.