Class JMethod

java.lang.Object
pascal.taie.language.classes.ClassMember
pascal.taie.language.classes.JMethod
All Implemented Interfaces:
Serializable, Annotated

public class JMethod extends ClassMember
Represents methods in the program. Each instance contains various information of a method, including method name, signature, declaring class, method body (IR), etc.
See Also:
  • Constructor Details

  • Method Details

    • isAbstract

      public boolean isAbstract()
    • isNative

      public boolean isNative()
    • isConstructor

      public boolean isConstructor()
    • isStaticInitializer

      public boolean isStaticInitializer()
    • getParamCount

      public int getParamCount()
    • getParamType

      public Type getParamType(int i)
    • getParamTypes

      public List<Type> getParamTypes()
    • hasParamAnnotation

      public boolean hasParamAnnotation(int i, String type)
      Returns:
      true if the i-th parameter has annotation of type.
    • getParamAnnotation

      @Nullable public Annotation getParamAnnotation(int i, String type)
      Returns:
      the annotation attached on the i-th parameter that is of type. If such annotation is absent, null is returned.
    • getParamAnnotations

      public Collection<Annotation> getParamAnnotations(int i)
      Returns:
      all annotations attached on the i-th parameter. If the parameter does not have annotation, an empty collection is returned.
    • getParamName

      @Nullable public String getParamName(int i)
    • getReturnType

      public Type getReturnType()
    • getExceptions

      public List<ClassType> getExceptions()
    • getSubsignature

      public Subsignature getSubsignature()
    • getGSignature

      @Nullable @Experimental public MethodGSignature getGSignature()
    • getMethodSource

      public Object getMethodSource()
    • getIR

      public IR getIR()
    • getRef

      public MethodRef getRef()
      Returns:
      the MethodRef pointing to this method.