类 Variables

  • 直接已知子类:
    TracedVariables

    public class Variables
    extends java.lang.Object
    This class represents a local variable frame that contains Value instances. Values are generalizations of all values that have been stored in the respective variables.
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      protected int size  
      protected Value[] values  
    • 构造器概要

      构造器 
      构造器 说明
      Variables​(int size)
      Creates a new Variables object with a given maximum number of variables.
      Variables​(Variables variables)
      Creates a Variables object that is a copy of the given Variables object.
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      ReferenceValue aload​(int index)
      Loads the ReferenceValue from the variable with the given index.
      DoubleValue dload​(int index)
      Loads the DoubleValue from the variable with the given index.
      boolean equals​(java.lang.Object object)  
      FloatValue fload​(int index)
      Loads the FloatValue from the variable with the given index.
      boolean generalize​(Variables other, boolean clearConflictingOtherVariables)
      Generalizes the values of this Variables object with the values of the given Variables object.
      Value getValue​(int index)
      Gets the Value of the variable with the given index, without disturbing it.
      Value[] getValues()
      Gets the Values of the variables array, without disturbing it.
      int hashCode()  
      IntegerValue iload​(int index)
      Loads the IntegerValue from the variable with the given index.
      void initialize​(Variables other)
      Initializes the values of this Variables object with the values of the given Variables object.
      LongValue lload​(int index)
      Loads the LongValue from the variable with the given index.
      Value load​(int index)
      Loads the Value from the variable with the given index.
      InstructionOffsetValue oload​(int index)
      Loads the InstructionOffsetValue from the variable with the given index.
      void replaceReferences​(Value toReplace, Value replacement)
      Replaces all the references to {@param toReplace} with references to {@param replacement}.
      void replaceReferencesIf​(java.util.function.Predicate<Value> predicate, java.util.function.UnaryOperator<Value> op)
      Apply {@param op} to all values that match {@param predicate}.
      void reset​(int size)
      Resets this Variables object, so that it can be reused.
      int size()
      Returns the number of variables.
      void store​(int index, Value value)
      Stores the given Value at the given variable index.
      java.lang.String toString()  
      • 从类继承的方法 java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 字段详细资料

      • values

        protected Value[] values
      • size

        protected int size
    • 构造器详细资料

      • Variables

        public Variables​(int size)
        Creates a new Variables object with a given maximum number of variables.
      • Variables

        public Variables​(Variables variables)
        Creates a Variables object that is a copy of the given Variables object.
    • 方法详细资料

      • reset

        public void reset​(int size)
        Resets this Variables object, so that it can be reused.
      • initialize

        public void initialize​(Variables other)
        Initializes the values of this Variables object with the values of the given Variables object. The other object may have fewer values, in which case the remaining values are left unchanged.
      • generalize

        public boolean generalize​(Variables other,
                                  boolean clearConflictingOtherVariables)
        Generalizes the values of this Variables object with the values of the given Variables object.
        参数:
        clearConflictingOtherVariables - specifies whether the other variables should be cleared too, in case of conflicts.
        返回:
        whether the generalization has made any difference.
      • size

        public int size()
        Returns the number of variables.
      • getValue

        public Value getValue​(int index)
        Gets the Value of the variable with the given index, without disturbing it.
      • getValues

        public Value[] getValues()
        Gets the Values of the variables array, without disturbing it.
      • store

        public void store​(int index,
                          Value value)
        Stores the given Value at the given variable index.
      • load

        public Value load​(int index)
        Loads the Value from the variable with the given index.
      • iload

        public IntegerValue iload​(int index)
        Loads the IntegerValue from the variable with the given index.
      • lload

        public LongValue lload​(int index)
        Loads the LongValue from the variable with the given index.
      • fload

        public FloatValue fload​(int index)
        Loads the FloatValue from the variable with the given index.
      • dload

        public DoubleValue dload​(int index)
        Loads the DoubleValue from the variable with the given index.
      • aload

        public ReferenceValue aload​(int index)
        Loads the ReferenceValue from the variable with the given index.
      • oload

        public InstructionOffsetValue oload​(int index)
        Loads the InstructionOffsetValue from the variable with the given index.
      • replaceReferences

        public void replaceReferences​(Value toReplace,
                                      Value replacement)
        Replaces all the references to {@param toReplace} with references to {@param replacement}.
      • replaceReferencesIf

        public void replaceReferencesIf​(java.util.function.Predicate<Value> predicate,
                                        java.util.function.UnaryOperator<Value> op)
        Apply {@param op} to all values that match {@param predicate}.
      • equals

        public boolean equals​(java.lang.Object object)
        覆盖:
        equals 在类中 java.lang.Object
      • hashCode

        public int hashCode()
        覆盖:
        hashCode 在类中 java.lang.Object
      • toString

        public java.lang.String toString()
        覆盖:
        toString 在类中 java.lang.Object