Package soot.options

Class SMBOptions


  • @Generated(value="Saxonica v3.0",
               comments="from soot_options.xml")
    public class SMBOptions
    extends Object
    Option parser for Static Method Binder.
    • Field Detail

      • allowed_modifier_changes_unsafe

        public static final int allowed_modifier_changes_unsafe
        See Also:
        Constant Field Values
      • allowed_modifier_changes_safe

        public static final int allowed_modifier_changes_safe
        See Also:
        Constant Field Values
      • allowed_modifier_changes_none

        public static final int allowed_modifier_changes_none
        See Also:
        Constant Field Values
    • Constructor Detail

    • Method Detail

      • 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.