Interface JMethod

All Superinterfaces:
HasAnnotations, HasTypeParameters, JAbstractMethod
All Known Subinterfaces:
JAnnotationMethod

public interface JMethod extends JAbstractMethod
Represents a method declaration.
  • Method Details

    • getReadableDeclaration

      String getReadableDeclaration(boolean noAccess, boolean noNative, boolean noStatic, boolean noFinal, boolean noAbstract)
      Returns a String representing the source code declaration of this method, containing access modifiers, type parameters, return type, method name, parameter list, and throws. Doesn't include the method body or trailing semicolon.
      Parameters:
      noAccess - if true, print no access modifiers
      noNative - if true, don't print the native modifier
      noStatic - if true, don't print the static modifier
      noFinal - if true, don't print the final modifier
      noAbstract - if true, don't print the abstract modifier
    • getReturnType

      JType getReturnType()
    • isAbstract

      boolean isAbstract()
    • isFinal

      boolean isFinal()
    • isNative

      boolean isNative()
    • isStatic

      boolean isStatic()