Class ReferenceValue

Direct Known Subclasses:
MultiTypedReferenceValue, TracedReferenceValue, TypedReferenceValue, UnknownReferenceValue

public abstract class ReferenceValue extends Category1Value
Representation of a partially evaluated reference value.
  • Constructor Details

    • ReferenceValue

      public ReferenceValue()
  • Method Details

    • value

      @Deprecated public Object value()
      Deprecated.
      Returns the value.

      Deprecated, use getValue() instead.

    • getValue

      @NotNull public @NotNull AnalyzedObject getValue()
    • getType

      public abstract String getType()
      Returns the type.
    • getReferencedClass

      public abstract Clazz getReferencedClass()
      Returns the class that is referenced by the type.
    • mayBeExtension

      public abstract boolean mayBeExtension()
      Returns whether the actual type of this ReferenceValue may be an extension of its type.
    • isNull

      public abstract int isNull()
      Returns whether this ReferenceValue is null.
      Returns:
      NEVER, MAYBE, or ALWAYS.
    • instanceOf

      public abstract int instanceOf(String otherType, Clazz otherReferencedClass)
      Returns whether the type is an instance of the given type.
    • cast

      public abstract ReferenceValue cast(String type, Clazz referencedClass, ValueFactory valueFactory, boolean alwaysCast)
      Returns this ReferenceValue, cast to the given type.
    • arrayLength

      public IntegerValue arrayLength(ValueFactory valueFactory)
      Returns the length of the array, assuming this type is an array.
    • integerArrayLoad

      public IntegerValue integerArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
      Returns the value of the array at the given index, assuming this type is an integer array.
    • longArrayLoad

      public LongValue longArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
      Returns the value of the array at the given index, assuming this type is an long array.
    • floatArrayLoad

      public FloatValue floatArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
      Returns the value of the array at the given index, assuming this type is an float array.
    • doubleArrayLoad

      public DoubleValue doubleArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
      Returns the value of the array at the given index, assuming this type is an double array.
    • referenceArrayLoad

      public ReferenceValue referenceArrayLoad(IntegerValue indexValue, ValueFactory valueFactory)
      Returns the value of the array at the given index, assuming this type is a reference array.
    • arrayStore

      public void arrayStore(IntegerValue indexValue, Value value)
      Stores the given value at the given index in the given array, assuming this type is an array.
    • generalize

      public abstract ReferenceValue generalize(ReferenceValue other)
      Returns the generalization of this ReferenceValue and the given other ReferenceValue.
    • equal

      public abstract int equal(ReferenceValue other)
      Returns whether this ReferenceValue is equal to the given other ReferenceValue.
      Returns:
      NEVER, MAYBE, or ALWAYS.
    • isNotNull

      public final int isNotNull()
      Returns whether this ReferenceValue is not null.
      Returns:
      NEVER, MAYBE, or ALWAYS.
    • notEqual

      public final int notEqual(ReferenceValue other)
      Returns whether this ReferenceValue and the given ReferenceValue are different.
      Returns:
      NEVER, MAYBE, or ALWAYS.
    • generalize

      public ReferenceValue generalize(UnknownReferenceValue other)
      Returns the generalization of this ReferenceValue and the given other UnknownReferenceValue.
    • equal

      public int equal(UnknownReferenceValue other)
      Returns whether this ReferenceValue is equal to the given other UnknownReferenceValue.
      Returns:
      NEVER, MAYBE, or ALWAYS.
    • generalize

      public ReferenceValue generalize(TypedReferenceValue other)
      Returns the generalization of this ReferenceValue and the given other TypedReferenceValue.
    • equal

      public int equal(TypedReferenceValue other)
      Returns whether this ReferenceValue is equal to the given other TypedReferenceValue.
      Returns:
      NEVER, MAYBE, or ALWAYS.
    • generalize

      public ReferenceValue generalize(MultiTypedReferenceValue other)
      Returns the generalization of this ReferenceValue and the given other MultiTypedReferenceValue.
    • equal

      public int equal(MultiTypedReferenceValue other)
      Returns whether this ReferenceValue is equal to the given other MultiTypedReferenceValue.
      Returns:
      NEVER, MAYBE, or ALWAYS.
    • generalize

      public ReferenceValue generalize(IdentifiedReferenceValue other)
      Returns the generalization of this ReferenceValue and the given other IdentifiedReferenceValue.
    • equal

      public int equal(IdentifiedReferenceValue other)
      Returns whether this ReferenceValue is equal to the given other IdentifiedReferenceValue.
      Returns:
      NEVER, MAYBE, or ALWAYS.
    • generalize

      public ReferenceValue generalize(ArrayReferenceValue other)
      Returns the generalization of this ReferenceValue and the given other ArrayReferenceValue.
    • equal

      public int equal(ArrayReferenceValue other)
      Returns whether this ReferenceValue is equal to the given other ArrayReferenceValue.
      Returns:
      NEVER, MAYBE, or ALWAYS.
    • generalize

      public ReferenceValue generalize(IdentifiedArrayReferenceValue other)
      Returns the generalization of this ReferenceValue and the given other IdentifiedArrayReferenceValue.
    • equal

      public int equal(IdentifiedArrayReferenceValue other)
      Returns whether this ReferenceValue is equal to the given other IdentifiedArrayReferenceValue.
      Returns:
      NEVER, MAYBE, or ALWAYS.
    • generalize

      public ReferenceValue generalize(DetailedArrayReferenceValue other)
      Returns the generalization of this ReferenceValue and the given other DetailedArrayReferenceValue.
    • equal

      public int equal(DetailedArrayReferenceValue other)
      Returns whether this ReferenceValue is equal to the given other DetailedArrayReferenceValue.
      Returns:
      NEVER, MAYBE, or ALWAYS.
    • generalize

      public ReferenceValue generalize(TracedReferenceValue other)
      Returns the generalization of this ReferenceValue and the given other TracedReferenceValue.
    • equal

      public int equal(TracedReferenceValue other)
      Returns whether this ReferenceValue is equal to the given other TracedReferenceValue.
      Returns:
      NEVER, MAYBE, or ALWAYS.
    • generalize

      public ReferenceValue generalize(ParticularReferenceValue other)
      Returns the generalization of this ReferenceValue and the given other ParticularReferenceValue.
    • equal

      public int equal(ParticularReferenceValue other)
      Returns whether this ReferenceValue is equal to the given other ParticularReferenceValue.
      Returns:
      NEVER, MAYBE, or ALWAYS.
    • referenceValue

      public final ReferenceValue referenceValue()
      Description copied from class: Value
      Returns this Value as a ReferenceValue.
      Overrides:
      referenceValue in class Value
    • generalize

      public final Value generalize(Value other)
      Description copied from class: Value
      Returns the generalization of this Value and the given other Value.
      Specified by:
      generalize in class Value
    • computationalType

      public final int computationalType()
      Description copied from class: Value
      Returns the computational type of this Value.
      Specified by:
      computationalType in class Value
      Returns:
      TYPE_INTEGER, TYPE_LONG, TYPE_FLOAT, TYPE_DOUBLE, TYPE_REFERENCE, or TYPE_INSTRUCTION_OFFSET.
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object