|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.brics.string.java.ResolverMethodCallTranslator
public class ResolverMethodCallTranslator
Uses a list of Resolver
strategies to translate method calls.
String
, StringBuffer
, StringBuilder
, or an array of String
s,
but the static return type may be less specific than that. For example, a method that
returns Cloneable
might return an array of strings, and one that returns Appendable
might return a string buffer.
Constructor Summary | |
---|---|
ResolverMethodCallTranslator(Collection<? extends Resolver> resolvers)
Creates a strategy that translates methods using information provided by the specified Resolver strategies. |
Method Summary | |
---|---|
Variable |
translateAbstractMethodCall(InstanceInvokeExpr expr,
SootMethod target,
Variable callee,
List<Variable> arguments,
IntermediateFactory factory)
Translates a non-static method call made to the specified method, which might be directed to a different implementation than that method. |
boolean |
translateConstructorCall(InstanceInvokeExpr expr,
Variable callee,
List<Variable> arguments,
IntermediateFactory factory)
Translates a constructor invocation into a sequence of statements. |
Variable |
translateMethodCall(InstanceInvokeExpr expr,
SootMethod target,
Variable callee,
List<Variable> arguments,
IntermediateFactory factory)
Translates a non-static method call into a sequence of statements. |
Variable |
translateStaticMethodCall(InvokeExpr expr,
List<Variable> arguments,
IntermediateFactory factory)
Translates a static method call into a sequence of statements. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResolverMethodCallTranslator(Collection<? extends Resolver> resolvers)
Resolver
strategies.
resolvers
- resolvers used to examine invocations. Should not contain duplicates.Method Detail |
---|
public Variable translateAbstractMethodCall(InstanceInvokeExpr expr, SootMethod target, Variable callee, List<Variable> arguments, IntermediateFactory factory)
MethodCallTranslator
MethodCallTranslator.translateMethodCall(soot.jimple.InstanceInvokeExpr, soot.SootMethod, dk.brics.string.intermediate.Variable, java.util.List, dk.brics.string.java.IntermediateFactory)
variant. If no translation can be found for an abstract invocation, each possible
invocation target is inspected and MethodCallTranslator.translateMethodCall(soot.jimple.InstanceInvokeExpr, soot.SootMethod, dk.brics.string.intermediate.Variable, java.util.List, dk.brics.string.java.IntermediateFactory)
will then be called for each target.
translateAbstractMethodCall
in interface MethodCallTranslator
expr
- the soot invocation expression. This provides access to the called method, parameter types, and declaring class.target
- the concrete implementation of the method being called. The expression might refer to a non-final method
which is overridden or implemented by the target.callee
- variable holding the object being called on.arguments
- variables holding the (already evaluated) arguments.factory
- object used to create statements and variables.
public boolean translateConstructorCall(InstanceInvokeExpr expr, Variable callee, List<Variable> arguments, IntermediateFactory factory)
MethodCallTranslator
translateConstructorCall
in interface MethodCallTranslator
expr
- the soot invocation expression. This provides access to the called method, parameter types, and declaring class.callee
- variable holding the object being called on.arguments
- variables holding the (already evaluated) arguments.factory
- object used to create statements and variables.
public Variable translateMethodCall(InstanceInvokeExpr expr, SootMethod target, Variable callee, List<Variable> arguments, IntermediateFactory factory)
MethodCallTranslator
translateMethodCall
in interface MethodCallTranslator
expr
- the soot invocation expression. This provides access to the called method, parameter types, and declaring class.target
- the concrete implementation of the method being called. The expression might refer to a non-final method
which is overridden or implemented by the target.callee
- variable holding the object being called on.arguments
- variables holding the (already evaluated) arguments.factory
- object used to create statements and variables.
public Variable translateStaticMethodCall(InvokeExpr expr, List<Variable> arguments, IntermediateFactory factory)
MethodCallTranslator
translateStaticMethodCall
in interface MethodCallTranslator
expr
- the soot invocation expression. This provides access to the called method, parameter types, and declaring class.arguments
- variables holding the (already evaluated) arguments.factory
- object used to create statements and variables
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |