Package soot
Interface SootMethodRef
-
- All Superinterfaces:
SootMethodInterface
- All Known Implementing Classes:
PolymorphicMethodRef,SootMethodRefImpl
public interface SootMethodRef extends SootMethodInterface
Representation of a reference to a method as it appears in a class file. Note that the method directly referred to may not actually exist; the actual target of the reference is determined according to the resolution procedure in the Java Virtual Machine Specification, 2nd ed, section 5.4.3.3.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description SootClassdeclaringClass()Deprecated.NumberedStringgetSubSignature()default booleanisConstructor()Gets whether this method reference points to a constructorStringname()Deprecated.TypeparameterType(int i)Deprecated.List<Type>parameterTypes()Deprecated.SootMethodresolve()Resolves this method call, i.e., finds the method to which this reference points.TypereturnType()Deprecated.SootMethodtryResolve()Tries to resolve this method call, i.e., tries to finds the method to which this reference points.-
Methods inherited from interface soot.SootMethodInterface
getDeclaringClass, getName, getParameterType, getParameterTypes, getReturnType, getSignature, isStatic
-
-
-
-
Method Detail
-
declaringClass
@Deprecated SootClass declaringClass()
Deprecated.UseSootMethodInterface.getDeclaringClass()instead
-
name
@Deprecated String name()
Deprecated.UseSootMethodInterface.getName()instead
-
parameterTypes
@Deprecated List<Type> parameterTypes()
Deprecated.UseSootMethodInterface.getParameterTypes()instead
-
returnType
@Deprecated Type returnType()
Deprecated.UseSootMethodInterface.getReturnType()instead
-
parameterType
@Deprecated Type parameterType(int i)
Deprecated.UseSootMethodInterface.getParameterType(int)instead
-
isConstructor
default boolean isConstructor()
Gets whether this method reference points to a constructor- Returns:
- True if this reference points to a constructor, false otherwise
-
getSubSignature
NumberedString getSubSignature()
-
resolve
SootMethod resolve()
Resolves this method call, i.e., finds the method to which this reference points. This method does not handle virtual dispatch, it just gives the immediate target, which can also be an abstract method.- Returns:
- The immediate target if this method reference
- Throws:
SootMethodRefImpl.ClassResolutionFailedException- (can be suppressed byOptions.set_ignore_resolution_errors(boolean))
-
tryResolve
SootMethod tryResolve()
Tries to resolve this method call, i.e., tries to finds the method to which this reference points. This method does not handle virtual dispatch, it just gives the immediate target, which can also be an abstract method. This method is different fromresolve()in the following ways: (1) This method does not fail when the target method does not exist and phantom references are not allowed. In that case, it returnsnull. (2) Whileresolve()creates fake methods that throw exceptions when a target method does not exist and phantom references are allowed, this method returnsnull.- Returns:
- The immediate target if this method reference if available,
nullotherwise
-
-