Package pascal.taie.language.classes
Class JMethod
java.lang.Object
pascal.taie.language.classes.ClassMember
pascal.taie.language.classes.JMethod
- All Implemented Interfaces:
Serializable
,Annotated
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:
-
Field Summary
Fields inherited from class pascal.taie.language.classes.ClassMember
annotationHolder, declaringClass, modifiers, name, signature
-
Constructor Summary
ConstructorDescriptionJMethod
(JClass declaringClass, String name, Set<Modifier> modifiers, List<Type> paramTypes, Type returnType, List<ClassType> exceptions, MethodGSignature gSignature, AnnotationHolder annotationHolder, List<AnnotationHolder> paramAnnotations, List<String> paramNames, Object methodSource) -
Method Summary
Modifier and TypeMethodDescriptiongetIR()
getParamAnnotation
(int i, String type) getParamAnnotations
(int i) int
getParamName
(int i) getParamType
(int i) getRef()
boolean
hasParamAnnotation
(int i, String type) boolean
boolean
boolean
isNative()
boolean
Methods inherited from class pascal.taie.language.classes.ClassMember
getAnnotation, getAnnotations, getDeclaringClass, getModifiers, getName, getSignature, hasAnnotation, isApplication, isPrivate, isProtected, isPublic, isStatic, toString
-
Constructor Details
-
JMethod
public JMethod(JClass declaringClass, String name, Set<Modifier> modifiers, List<Type> paramTypes, Type returnType, List<ClassType> exceptions, @Nullable MethodGSignature gSignature, AnnotationHolder annotationHolder, @Nullable List<AnnotationHolder> paramAnnotations, @Nullable List<String> paramNames, Object methodSource)
-
-
Method Details
-
isAbstract
public boolean isAbstract() -
isNative
public boolean isNative() -
isConstructor
public boolean isConstructor() -
isStaticInitializer
public boolean isStaticInitializer() -
getParamCount
public int getParamCount() -
getParamType
-
getParamTypes
-
hasParamAnnotation
- Returns:
true
if thei
-th parameter has annotation oftype
.
-
getParamAnnotation
- Returns:
- the annotation attached on the
i
-th parameter that is oftype
. If such annotation is absent,null
is returned.
-
getParamAnnotations
- Returns:
- all annotations attached on the
i
-th parameter. If the parameter does not have annotation, an empty collection is returned.
-
getParamName
-
getReturnType
-
getExceptions
-
getSubsignature
-
getGSignature
-
getMethodSource
-
getIR
-
getRef
- Returns:
- the
MethodRef
pointing to this method.
-