soot.options
Class SMBOptions
java.lang.Object
|
+--soot.options.SMBOptions
- public class SMBOptions
- extends java.lang.Object
Option parser for Static Method Binder.
Constructor Summary |
SMBOptions(java.util.Map options)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
allowed_modifier_changes_unsafe
public static final int allowed_modifier_changes_unsafe
allowed_modifier_changes_safe
public static final int allowed_modifier_changes_safe
allowed_modifier_changes_none
public static final int allowed_modifier_changes_none
SMBOptions
public SMBOptions(java.util.Map options)
enabled
public boolean enabled()
- Enabled --
.
insert_null_checks
public boolean insert_null_checks()
- Insert Null Checks --
.
Insert a check that, before invoking the static copy of the
target method, throws a NullPointerException if the receiver
object is null. This ensures that static method binding does
not eliminate exceptions which would have occurred in its
absence.
insert_redundant_casts
public boolean insert_redundant_casts()
- Insert Redundant Casts --
.
Insert extra casts for the Java bytecode verifier. If the
target method uses its this parameter, a reference to the
receiver object must be passed to the static copy of the target
method. The verifier may complain if the declared type of the
receiver parameter does not match the type implementing the
target method. Say, for example, that Singer is an interface
declaring the sing() method and that the call graph shows all
receiver objects at a particular call site, singer.sing() (with
singer declared as a Singer) are in fact Bird objects (Bird
being a class that implements Singer). The virtual call
singer.sing() is effectively replaced with the static call
Bird.staticsing(singer). Bird.staticsing() may perform
operations on its parameter which are only allowed on Birds,
rather than Singers. The Insert Redundant Casts option inserts
a cast of singer to the Bird type, to prevent complaints from
the verifier.
allowed_modifier_changes
public int allowed_modifier_changes()
- Allowed Modifier Changes --
.
Specify which changes in visibility modifiers are allowed.