Package sootup.callgraph.reflection
Class AbstractReflectionModel
java.lang.Object
sootup.callgraph.reflection.AbstractReflectionModel
- All Implemented Interfaces:
ReflectionModel
- Direct Known Subclasses:
TamiflexReflectionModel
Base for
ReflectionModels: dispatches each reflective call site to a per-API hook and
splices the returned stmts in front of it (the original call stays). Rewritten bodies are cached
per method signature, so one instance must only be used with one View; the first body
passed for a method wins.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final recordThe method being rewritten, its original body, and the builder for the rewritten one. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static ReflectionKindKind of reflective APImethodSig(astoString()) is, ornull.@NonNull Bodyresolve(@NonNull SootMethod method, @NonNull Body body) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface sootup.callgraph.reflection.ReflectionModel
isNone
-
Field Details
-
SIG_FOR_NAME
- See Also:
-
SIG_FOR_NAME2
- See Also:
-
SIG_CLASS_NEW_INSTANCE
- See Also:
-
SIG_CONSTRUCTOR_NEW_INSTANCE
- See Also:
-
SIG_METHOD_INVOKE
- See Also:
-
SIG_FIELD_SET
- See Also:
-
SIG_FIELD_GET
- See Also:
-
SIG_ARRAY_NEW_INSTANCE
- See Also:
-
SIG_ARRAY_GET
- See Also:
-
SIG_ARRAY_SET
- See Also:
-
view
-
-
Constructor Details
-
AbstractReflectionModel
-
-
Method Details
-
resolve
- Specified by:
resolvein interfaceReflectionModel- Parameters:
method- the method owningbodybody- the body to rewrite (not modified)- Returns:
bodyitself if nothing reflective was resolved, else a rewritten copy
-
kindOf
Kind of reflective APImethodSig(astoString()) is, ornull. -
transformClassForName
protected abstract List<Stmt> transformClassForName(AbstractReflectionModel.MethodContext ctx, InvokableStmt s) -
transformClassNewInstance
protected abstract List<Stmt> transformClassNewInstance(AbstractReflectionModel.MethodContext ctx, InvokableStmt s) -
transformConstructorNewInstance
protected abstract List<Stmt> transformConstructorNewInstance(AbstractReflectionModel.MethodContext ctx, InvokableStmt s) -
transformMethodInvoke
protected abstract List<Stmt> transformMethodInvoke(AbstractReflectionModel.MethodContext ctx, InvokableStmt s) -
transformFieldSet
protected abstract List<Stmt> transformFieldSet(AbstractReflectionModel.MethodContext ctx, InvokableStmt s) -
transformFieldGet
protected abstract List<Stmt> transformFieldGet(AbstractReflectionModel.MethodContext ctx, InvokableStmt s) -
transformArrayNewInstance
protected abstract List<Stmt> transformArrayNewInstance(AbstractReflectionModel.MethodContext ctx, InvokableStmt s) -
transformArrayGet
protected abstract List<Stmt> transformArrayGet(AbstractReflectionModel.MethodContext ctx, InvokableStmt s) -
transformArraySet
protected abstract List<Stmt> transformArraySet(AbstractReflectionModel.MethodContext ctx, InvokableStmt s)
-