chord.analyses.invk
Class StubRewrite
java.lang.Object
chord.analyses.invk.StubRewrite
public class StubRewrite
- extends java.lang.Object
Used to rewrite method calls, to facilitate stub implementations or
analyzable models.
If property chord.methodRemapFile is set, will read a map from that file.
Format is source-method dest-method, separated by a space.
Both source and dest should be fully qualified method names, of the form
methodName:desc@declaringClass
Blank lines and lines starting with a # are ignored as comments.
Note that for virtual function calls, the rewrite happens AFTER
the call target is resolved. So if you have a stub implementation for
Derived.foo, then a call to Base.foo on an instance of Derived should
call the stub.
Be careful about the prototype for the function being mapped; the remap
will fail with a warning message if any details do not match.
Note also that there is no checking performed that the old and new functions
have the compatible prototypes. Arguments and return values may wind up
not propagating correctly if, e.g., a 2-argument function is remapped
to a 3-argument function.
|
Method Summary |
static void |
addNewDests(java.util.Collection<joeq.Class.jq_Method> publicMethods)
|
static void |
init()
|
static joeq.Class.jq_Method |
maybeReplaceCallDest(joeq.Class.jq_Method m)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StubRewrite
public StubRewrite()
maybeReplaceCallDest
public static joeq.Class.jq_Method maybeReplaceCallDest(joeq.Class.jq_Method m)
init
public static void init()
addNewDests
public static void addNewDests(java.util.Collection<joeq.Class.jq_Method> publicMethods)