soot.jimple.toolkits.invoke
Class AccessManager
java.lang.Object
|
+--soot.jimple.toolkits.invoke.AccessManager
- public class AccessManager
- extends java.lang.Object
Methods for checking Java scope and visibiliity requirements.
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
AccessManager
public AccessManager()
isAccessLegal
public static boolean isAccessLegal(SootMethod container,
ClassMember target)
- Returns true iff target is legally accessible from container.
Illegal access occurs when any of the following cases holds:
1. target is private, but container.declaringClass() !=
target.declaringClass(); or,
2. target is package-visible, and its package differs from
that of container; or,
3. target is protected, and either:
a. container doesn't belong to target.declaringClass,
or any subclass of ;
isAccessLegal
public static boolean isAccessLegal(SootMethod container,
SootClass target)
- Returns true if an access to
target
is legal from code in container
.
ensureAccess
public 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
.
ensureAccess
public 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
.