Class MethodReference
java.lang.Object
com.ibm.wala.types.MemberReference
com.ibm.wala.types.MethodReference
A class to represent the reference in a class file to a method.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classAn identifier/selector for methods. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Atomstatic final Selectorstatic final Descriptorstatic final Atomstatic final Descriptorstatic final Selectorstatic final Atomstatic final Selectorstatic final Atomstatic final Atomstatic final Selectorstatic final MethodReferencestatic final MethodReferencestatic final MemberReferencestatic final MethodReferencestatic final Atomstatic final Atomstatic final Descriptorstatic final Selector -
Method Summary
Modifier and TypeMethodDescriptionstatic MethodReferencefindOrCreate(Language l, ClassLoaderReference loader, String methodClass, String methodName, String methodSignature) static MethodReferencefindOrCreate(Language l, TypeReference t, String methodName, String descriptor) static MethodReferencefindOrCreate(ClassLoaderReference loader, String methodClass, String methodName, String methodSignature) static MethodReferencefindOrCreate(TypeReference tref, Atom mn, Descriptor md) Find or create the canonical MethodReference instance for the given tuple.static MethodReferencefindOrCreate(TypeReference tref, Selector selector) Find or create the canonical MethodReference instance for the given tuple.static MethodReferencefindOrCreate(TypeReference t, String methodName, String descriptor) intThis method does NOT include the implicit "this" parametergetParameterType(int i) booleanisInit()toString()Methods inherited from class MemberReference
equals, getDeclaringClass, getName, hashCode
-
Field Details
-
newInstanceAtom
-
JavaLangClassNewInstance
-
JavaLangReflectCtorNewInstance
-
forNameAtom
-
JavaLangClassForName
-
initAtom
-
defaultInitDesc
-
initSelector
-
clinitName
-
clinitSelector
-
finalizeName
-
finalizeSelector
-
runAtom
-
runDesc
-
runSelector
-
equalsAtom
-
equalsDesc
-
equalsSelector
-
lambdaMetafactory
-
-
Method Details
-
findOrCreate
Find or create the canonical MethodReference instance for the given tuple.- Parameters:
mn- the name of the membermd- the descriptor of the member
-
findOrCreate
Find or create the canonical MethodReference instance for the given tuple.- Parameters:
tref- the type referenceselector- the selector for the method- Throws:
IllegalArgumentException- if selector is null
-
findOrCreate
public static MethodReference findOrCreate(TypeReference t, String methodName, String descriptor) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
findOrCreate
public static MethodReference findOrCreate(Language l, TypeReference t, String methodName, String descriptor) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
findOrCreate
public static MethodReference findOrCreate(ClassLoaderReference loader, String methodClass, String methodName, String methodSignature) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
findOrCreate
public static MethodReference findOrCreate(Language l, ClassLoaderReference loader, String methodClass, String methodName, String methodSignature) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
getDescriptor
- Returns:
- the descriptor component of this member reference
-
toString
-
getReturnType
- Returns:
- return type of the method
-
getParameterType
- Returns:
- ith parameter to the method. This does NOT include the implicit "this" pointer.
- Throws:
IllegalArgumentException
-
isInit
public boolean isInit() -
getSignature
- Specified by:
getSignaturein classMemberReference- Returns:
- something like: com.foo.bar.createLargeOrder(IILjava/lang/String;Ljava/sql/Date;)Ljava/lang/Integer;
-
getSelector
- Returns:
- something like: createLargeOrder(IILjava.lang.String;SLjava.sql.Date;)Ljava.lang.Integer;
-
getNumberOfParameters
public int getNumberOfParameters()This method does NOT include the implicit "this" parameter
-