Packages

c

org.opalj.value

AReferenceValue

case class AReferenceValue(referenceType: ReferenceType) extends IsReferenceValue with Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, IsReferenceValue, KnownTypedValue, KnownValue, ValueInformation, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AReferenceValue
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. IsReferenceValue
  7. KnownTypedValue
  8. KnownValue
  9. ValueInformation
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AReferenceValue(referenceType: ReferenceType)

Type Members

  1. type BaseReferenceValue = AReferenceValue
    Definition Classes
    AReferenceValueIsReferenceValue

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def allValues: Traversable[BaseReferenceValue]

    The set of base values this value abstracts over.

    The set of base values this value abstracts over. This set is never empty and contains this value if this value does not (further) abstract over other reference values; otherwise it only contains the base values, but not this value.

    Definition Classes
    IsReferenceValue
    Note

    Primarily defined as a convenience interface.

  5. def asBaseReferenceValue: AReferenceValue
    Definition Classes
    AReferenceValueIsReferenceValue
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. final def asReferenceType: ReferenceType

    Returns the type of the upper type bound if the upper type bound contains exactly one element.

    Returns the type of the upper type bound if the upper type bound contains exactly one element. That is, the function is only always defined iff the type is precise.

    Definition Classes
    IsReferenceValue
  8. final def asReferenceValue: IsReferenceValue
    Definition Classes
    IsReferenceValueValueInformation
  9. def baseValues: Traversable[AReferenceValue]

    In general an IsReferenceValue abstracts over all potential values and this information is sufficient for subsequent analyses; but in some cases, analyzing the set of underlying values may increase the overall precision and this set is returned by this function.

    In general an IsReferenceValue abstracts over all potential values and this information is sufficient for subsequent analyses; but in some cases, analyzing the set of underlying values may increase the overall precision and this set is returned by this function. In other words: if baseValues is nonEmpty, then the properties returned by this value are derived from the base values, but still maybe more specific. For example,

    Object o = _;
    if(...) o = f() else o = g();
    // when we reach this point, we generally don't know if the values returned by f and g
    // are non-null; hence, o is potentially null.
    if(o != null)
     // Now, we know that o is not null, but we still don't know if the values returned
     // by f OR g were null and we cannot establish that when we don't know to which value
     // o is actually referring to.
     u(o);
    returns

    The set of values this reference value abstracts over. The set is empty if this value is already a base value and it does not abstract over other values.

    Definition Classes
    AReferenceValueIsReferenceValue
    Note

    A reference value which belongs to the base values by some other reference value never has itself as a direct base value.

  10. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  11. final def computationalType: ComputationalType

    The computational type of the value.

    The computational type of the value.

    The precise computational type is, e.g., needed to calculate the effect of generic stack manipulation instructions (e.g., DUP_... and SWAP) on the stack as well as to calculate the jump targets of RET instructions and to determine which values are actually copied by, e.g., the dup_XX instructions.

    Definition Classes
    IsReferenceValueKnownTypedValue
    Note

    The computational type has to be precise/correct.

  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. final def hasCategory2ComputationalType: Boolean
    Definition Classes
    IsReferenceValueKnownTypedValue
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. def isNull: Answer

    If Yes the value is known to always be null at runtime.

    If Yes the value is known to always be null at runtime. In this case the upper bound is (has to be) empty. If the answer is Unknown then the analysis was not able to statically determine whether the value is null or is not null. In this case the upper bound is expected to be non-empty. If the answer is No then the value is statically known not to be null. In this case, the upper bound may precisely identify the runtime type or still just identify an upper bound.

    This default implementation always returns Unknown; this is a sound over-approximation.

    returns

    Unknown (default)

    Definition Classes
    IsReferenceValue
    Note

    This method is expected to be overridden by subtypes.

  18. def isPrecise: Boolean

    Returns true if the type information is precise.

    Returns true if the type information is precise. I.e., the type returned by upperTypeBound precisely models the runtime type of the value. If, isPrecise returns true, the type of this value can generally be assumed to represent a class type (not an interface type) or an array type. However, this domain also supports the case that isPrecise returns true even though the associated type identifies an interface type or an abstract class type. The later case may be interesting in the context of classes that are generated at run time.

    This default implementation always returns false.

    returns

    false (default)

    Definition Classes
    IsReferenceValue
    Note

    isPrecise is always true if this value is known to be null.

    ,

    This method is expected to be overridden by subtypes.

  19. final def isPrimitiveValue: Boolean

    True in case of a value with primitive type; undefined if the type is unknown.

    True in case of a value with primitive type; undefined if the type is unknown.

    Definition Classes
    IsReferenceValueValueInformation
  20. final def isReferenceValue: Boolean

    True if the value has a reference type; undefined if the type is unknown.

    True if the value has a reference type; undefined if the type is unknown.

    Definition Classes
    IsReferenceValueValueInformation
  21. final def isUnknownValue: Boolean

    Returns true if no type information is available.

    Returns true if no type information is available.

    Definition Classes
    KnownValueValueInformation
  22. def isValueASubtypeOf(referenceType: ReferenceType): Answer

    Tests if the type of this value is potentially a subtype of the specified reference type under the assumption that this value is not null.

    Tests if the type of this value is potentially a subtype of the specified reference type under the assumption that this value is not null. This test takes the precision of the type information into account. That is, if the currently available type information is not precise and the given type has a subtype that is always a subtype of the current upper type bound, then Unknown is returned. Given that it may be computationally intensive to determine whether two types have a common subtype it may be better to just return Unknown in case that this type and the given type are not in a direct inheritance relationship.

    Basically, this method implements the same semantics as the ClassHierarchy's isSubtypeOf method, but it additionally checks if the type of this value could be a subtype of the given supertype. I.e., if this value's type identifies a supertype of the given supertype and that type is not known to be precise, the answer is Unknown.

    For example, assume that the type of this reference value is java.util.Collection and we know/have to assume that this is only an upper bound. In this case an answer is No if and only if it is impossible that the runtime type is a subtype of the given supertype. This condition holds, for example, for java.io.File which is not a subclass of java.util.Collection and which does not have any further subclasses (in the JDK). I.e., the classes java.io.File and java.util.Collection are not in an inheritance relationship. However, if the specified supertype would be java.util.List the answer would be unknown.

    returns

    This default implementation always returns Unknown.

    Definition Classes
    IsReferenceValue
    Note

    The function isValueASubtypeOf is not defined if isNull returns Yes; if isNull is Unknown then the result is given under the assumption that the value is not null at runtime. In other words, if this value represents null this method is not supported.

    ,

    This method is expected to be overridden by subtypes.

  23. final def isVoid: Boolean

    True if the value is "Void"; undefined if the type is unknown.

    True if the value is "Void"; undefined if the type is unknown.

    Definition Classes
    IsReferenceValueValueInformation
  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. val referenceType: ReferenceType
  28. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  29. def upperTypeBound: UIDSet[_ <: ReferenceType]

    The upper bound of the value's type.

    The upper bound of the value's type. The upper bound is empty if this value is null (i.e., isNull == Yes). The upper bound is only guaranteed to contain exactly one type if the type is precise. (i.e., isPrecise == true). Otherwise, the upper type bound may contain one or more types that are not known to be in an inheritance relation, but which will correctly approximate the runtime type.

    Definition Classes
    AReferenceValueIsReferenceValue
    Note

    If only a part of a project is analyzed, the class hierarchy may be fragmented and it may happen that two classes that are indeed in an inheritance relation – if we would analyze the complete project – are part of the upper type bound.

  30. def valueType: Option[ReferenceType]

    The least upper unique type bound of the upper type value.

    The least upper unique type bound of the upper type value. None if and only if the underlying value is null.

    Definition Classes
    AReferenceValueIsReferenceValue
  31. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from IsReferenceValue

Inherited from KnownTypedValue

Inherited from KnownValue

Inherited from ValueInformation

Inherited from AnyRef

Inherited from Any

Ungrouped