Class ReferenceValue

java.lang.Object
randoop.sequence.ReferenceValue

public final class ReferenceValue extends Object
Represents a ReferenceType value created by the execution of a Statement. Includes the type.
  • Field Details

    • type

      private final ReferenceType type
      The type of this value.
    • value

      private final Object value
      The Object reference of this value.
  • Constructor Details

    • ReferenceValue

      ReferenceValue(ReferenceType type, Object value)
      Create the value object given its type and Object reference.
      Parameters:
      type - the type of this value
      value - the Object reference to this value
  • Method Details

    • equals

      public boolean equals(Object obj)
      Indicates whether two ReferenceValue objects are equal. Note: tests the Object value of each object by identity.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to test for equality
      Returns:
      true if parameter has the same type and identical value to this object, false otherwise
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object
    • getObjectValue

      public Object getObjectValue()
      Returns the Object reference of this value.
      Returns:
      the reference to the value
    • getType

      public ReferenceType getType()
      Returns the type of this value.
      Returns:
      the type of this value