类 SimpleVerifier

所有已实现的接口:
Opcodes

public class SimpleVerifier extends BasicVerifier
An extended BasicVerifier that performs more precise verifications. This verifier computes exact class types, instead of using a single "object reference" type (as done in the BasicVerifier).
作者:
Eric Bruneton, Bing Ran
  • 构造器详细资料

    • SimpleVerifier

      public SimpleVerifier()
      Constructs a new SimpleVerifier.
    • SimpleVerifier

      public SimpleVerifier(Type currentClass, Type currentSuperClass, boolean isInterface)
      Constructs a new SimpleVerifier to verify a specific class. This class will not be loaded into the JVM since it may be incorrect.
      参数:
      currentClass - the class that is verified.
      currentSuperClass - the super class of the class that is verified.
      isInterface - if the class that is verified is an interface.
    • SimpleVerifier

      public SimpleVerifier(Type currentClass, Type currentSuperClass, List<Type> currentClassInterfaces, boolean isInterface)
      Constructs a new SimpleVerifier to verify a specific class. This class will not be loaded into the JVM since it may be incorrect.
      参数:
      currentClass - the class that is verified.
      currentSuperClass - the super class of the class that is verified.
      currentClassInterfaces - the interfaces implemented by the class that is verified.
      isInterface - if the class that is verified is an interface.
    • SimpleVerifier

      protected SimpleVerifier(int api, Type currentClass, Type currentSuperClass, List<Type> currentClassInterfaces, boolean isInterface)
  • 方法详细资料

    • setClassLoader

      public void setClassLoader(ClassLoader loader)
      Set the ClassLoader which will be used to load referenced classes. This is useful if you are verifying multiple interdependent classes.
      参数:
      loader - a ClassLoader to use
    • newValue

      public BasicValue newValue(Type type)
      从类复制的说明: Interpreter
      Creates a new value that represents the given type. Called for method parameters (including this), exception handler variable and with null type for variables reserved by long and double types.
      覆盖:
      newValue 在类中 BasicInterpreter
      参数:
      type - a primitive or reference type, or null to represent an uninitialized value.
      返回:
      a value that represents the given type. The size of the returned value must be equal to the size of the given type.
    • isArrayValue

      protected boolean isArrayValue(BasicValue value)
      覆盖:
      isArrayValue 在类中 BasicVerifier
    • getElementValue

      protected BasicValue getElementValue(BasicValue objectArrayValue) throws AnalyzerException
      覆盖:
      getElementValue 在类中 BasicVerifier
      抛出:
      AnalyzerException
    • isSubTypeOf

      protected boolean isSubTypeOf(BasicValue value, BasicValue expected)
      覆盖:
      isSubTypeOf 在类中 BasicVerifier
    • merge

      public BasicValue merge(BasicValue v, BasicValue w)
      从类复制的说明: Interpreter
      Merges two values. The merge operation must return a value that represents both values (for instance, if the two values are two types, the merged value must be a common super type of the two types. If the two values are integer intervals, the merged value must be an interval that contains the previous ones. Likewise for other types of values).
      覆盖:
      merge 在类中 BasicInterpreter
      参数:
      v - a value.
      w - another value.
      返回:
      the merged value. If the merged value is equal to v, this method must return v.
    • isInterface

      protected boolean isInterface(Type t)
    • getSuperClass

      protected Type getSuperClass(Type t)
    • isAssignableFrom

      protected boolean isAssignableFrom(Type t, Type u)
    • getClass

      protected Class<?> getClass(Type t)