Interface ASTExecutableDeclaration

    • Method Detail

      • getGenericSignature

        JMethodSig getGenericSignature()
        Returns the generic signature for the method. This is a JMethodSig declared in the generic type declaration of the enclosing type. The signature may mention type parameters of the enclosing types, and its own type parameters.
      • getName

        String getName()
        Returns the name of the method, or the simple name of the declaring class for a constructor declaration.
      • isAbstract

        default boolean isAbstract()
        Returns true if this method is abstract, so doesn't declare a body. Interface members are implicitly abstract, whether they declare the abstract modifier or not. Default interface methods are not abstract though, consistently with the standard reflection API.
      • getFormalParameters

        default @NonNull ASTFormalParameters getFormalParameters()
        Returns the formal parameters node of this method or constructor.
      • getArity

        default int getArity()
        Returns the number of formal parameters expected by this declaration. This excludes any receiver parameter, which is irrelevant to arity.
      • getBody

        default @Nullable ASTBlock getBody()
        Returns the body of this method or constructor. Returns null if this is the declaration of an abstract method.
      • getThrowsList

        default @Nullable ASTThrowsList getThrowsList()
        Returns the throws clause of this declaration, or null if there is none.
      • isVarargs

        default boolean isVarargs()
        Returns true if this node's last formal parameter is varargs.
      • isStatic

        default boolean isStatic()
        Returns true if this is a static method. If this is a constructor, return false.
        Since:
        7.1.0
      • isFinal

        default boolean isFinal()
        Returns true if this is a final method. If this is a constructor, return false.
        Since:
        7.1.0