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
Modifier and TypeClassDescriptionprotected static class
An identifier/selector for methods. -
Field Summary
Modifier and TypeFieldDescriptionstatic final Atom
static final Selector
static final Descriptor
static final Atom
static final Descriptor
static final Selector
static final Atom
static final Selector
static final Atom
static final Atom
static final Selector
static final MethodReference
static final MethodReference
static final MemberReference
static final MethodReference
static final Atom
static final Atom
static final Descriptor
static final Selector
-
Method Summary
Modifier and TypeMethodDescriptionstatic MethodReference
findOrCreate
(Language l, ClassLoaderReference loader, String methodClass, String methodName, String methodSignature) static MethodReference
findOrCreate
(Language l, TypeReference t, String methodName, String descriptor) static MethodReference
findOrCreate
(ClassLoaderReference loader, String methodClass, String methodName, String methodSignature) static MethodReference
findOrCreate
(TypeReference tref, Atom mn, Descriptor md) Find or create the canonical MethodReference instance for the given tuple.static MethodReference
findOrCreate
(TypeReference tref, Selector selector) Find or create the canonical MethodReference instance for the given tuple.static MethodReference
findOrCreate
(TypeReference t, String methodName, String descriptor) int
This method does NOT include the implicit "this" parametergetParameterType
(int i) boolean
isInit()
toString()
Methods inherited from class com.ibm.wala.types.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:
getSignature
in 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
-