Interface ASTMethodOrConstructorDeclaration

    • 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.
        Specified by:
        isAbstract in interface AccessNode
      • 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.