public class AccessManager
extends java.lang.Object
Constructor and Description |
---|
AccessManager() |
Modifier and Type | Method and Description |
---|---|
static void |
createAccessorMethod(SootMethod container,
Stmt stmt)
Turns a field access or method call into a call to an accessor method.
|
static void |
createAccessorMethods(Body body,
Stmt before,
Stmt after)
Resolves illegal accesses in the interval ]before,after[ by creating
accessor methods.
|
static java.lang.String |
createAccessorName(ClassMember member,
boolean setter)
Creates a name for an accessor method.
|
static boolean |
ensureAccess(SootMethod container,
ClassMember target,
java.lang.String options)
Modifies code so that an access to
target is legal from code
in container . |
static boolean |
ensureAccess(SootMethod container,
SootClass target,
java.lang.String options)
Modifies code so that an access to
target is legal from code
in container . |
static boolean |
isAccessLegal(SootMethod container,
ClassMember target)
Returns true iff target is legally accessible from container.
|
static boolean |
isAccessLegal(SootMethod container,
SootClass target)
Returns true if an access to
target is legal from code in
container . |
static boolean |
isAccessLegal(SootMethod container,
Stmt stmt)
Returns true if the statement
stmt contains an illegal
access to a field or method, assuming the statement is in method
container |
public static boolean isAccessLegal(SootMethod container, ClassMember target)
public static boolean isAccessLegal(SootMethod container, SootClass target)
target
is legal from code in
container
.public static boolean isAccessLegal(SootMethod container, Stmt stmt)
stmt
contains an illegal
access to a field or method, assuming the statement is in method
container
container
- stmt
- public static void createAccessorMethods(Body body, Stmt before, Stmt after)
before
and after
can be null
to indicate beginning/end respectively.body
- before
- after
- public static java.lang.String createAccessorName(ClassMember member, boolean setter)
member
- setter
- public static void createAccessorMethod(SootMethod container, Stmt stmt)
container
- stmt
- public static boolean ensureAccess(SootMethod container, ClassMember target, java.lang.String options)
target
is legal from code
in container
.
The "accessors" option assumes suitable accessor methods will be created
after checking.public static boolean ensureAccess(SootMethod container, SootClass target, java.lang.String options)
target
is legal from code
in container
.