case class AProperMObjectValue(isNull: Answer, isPrecise: Boolean, upperTypeBound: UIDSet[ClassType], leastUpperType: Option[ReferenceType]) extends IsMObjectValue with Product with Serializable
Represents an object value which is either null or properly initialized.
- Source
- ValueInformation.scala
- Alphabetic
- By Inheritance
- AProperMObjectValue
- Serializable
- Product
- Equals
- IsMObjectValue
- IsBaseReferenceValue
- IsReferenceValue
- KnownTypedValue
- KnownValue
- ValueInformation
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new AProperMObjectValue(isNull: Answer, isPrecise: Boolean, upperTypeBound: UIDSet[ClassType], leastUpperType: Option[ReferenceType])
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def allValues: Iterable[AProperMObjectValue.this.type]
The set of base values (
IsReferenceValue) this value abstracts over.The set of base values (
IsReferenceValue) 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 notthisvalue.- Definition Classes
- IsBaseReferenceValue → IsReferenceValue
- Note
Primarily defined as a convenience interface.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asPrimitiveValue: IsPrimitiveValue[_ <: BaseType]
- Definition Classes
- ValueInformation
- 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
- final def asReferenceValue: IsReferenceValue
- Definition Classes
- IsReferenceValue → ValueInformation
- final def baseValues: Iterable[AProperMObjectValue.this.type]
In general an
IsReferenceValueabstracts 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
IsReferenceValueabstracts 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: ifbaseValuesis nonEmpty, then the properties returned bythisvalue 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
- IsBaseReferenceValue → IsReferenceValue
- Note
A reference value which belongs to the base values by some other reference value never has itself as a direct base value.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def computationalType: ComputationalType
The computational type of the value if this object represents a legal value.
The computational type of the value if this object represents a legal value.
The precise computational type is, e.g., needed to calculate the effect of generic stack manipulation instructions (e.g.,
DUP_...andSWAP) on the stack as well as to calculate the jump targets ofRETinstructions and to determine which values are actually copied by, e.g., thedup_XXinstructions.- Definition Classes
- IsReferenceValue → ValueInformation
- Exceptions thrown
IllegalStateExceptionif this value is illegal or void.- Note
The computational type has to be precise/correct.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def hasCategory2ComputationalType: Boolean
Returns
trueif and only if the value has the computational type 2;falsein all other cases (including the case where this value is illegal!).Returns
trueif and only if the value has the computational type 2;falsein all other cases (including the case where this value is illegal!).- Definition Classes
- IsReferenceValue → ValueInformation
- final def isArrayValue: Answer
Returns
Yesif the value is _not null_ and the least upper type bound is anArrayType; the value isUnknownif the least upper type bound isArrayTypebut the value may be null; in all other casesNois returned; in particular if the value is known to be null.Returns
Yesif the value is _not null_ and the least upper type bound is anArrayType; the value isUnknownif the least upper type bound isArrayTypebut the value may be null; in all other casesNois returned; in particular if the value is known to be null.Nois also returned if the value's type isObjectorSeriablizableorCloneable.- Definition Classes
- IsMObjectValue → ValueInformation
- final def isIllegalValue: Boolean
Returns
trueiff this value is not a legal value according to the JVM specification.Returns
trueiff this value is not a legal value according to the JVM specification. Such values cannot be used to perform any computations and will generally not occur in static analyses unless the analysis or the bytecode is buggy.- Definition Classes
- KnownValue → ValueInformation
- Note
An IsIllegalValue can always be distinguished from a void value.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val isNull: Answer
If
Yesthe value is known to always benullat runtime.If
Yesthe value is known to always benullat runtime. In this case the upper bound is (has to be) empty. If the answer isUnknownthen the analysis was not able to statically determine whether the value isnullor is notnull. In this case the upper bound is expected to be non-empty. If the answer isNothen the value is statically known not to benull. In this case, the upper bound may precisely identify the runtime type or still just identify an upper bound.- Definition Classes
- AProperMObjectValue → IsReferenceValue
- val isPrecise: Boolean
Returns
trueif the type information is precise.Returns
trueif the type information is precise. I.e., the type returned byupperTypeBoundprecisely models the runtime type of the value. If,isPrecisereturns 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 thatisPrecisereturnstrueeven 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.- Definition Classes
- AProperMObjectValue → IsMObjectValue → IsReferenceValue
- final def isPrimitiveValue: Boolean
Returns
truein case of a value with primitive type.Returns
truein case of a value with primitive type.- Definition Classes
- IsReferenceValue → ValueInformation
- Exceptions thrown
IllegalStateExceptionif this value is illegal.
- final def isReferenceValue: Boolean
Returns
trueif the value has a reference type.Returns
trueif the value has a reference type.- Definition Classes
- IsReferenceValue → ValueInformation
- Exceptions thrown
IllegalStateExceptionif this value is illegal.
- def isValueASubtypeOf(supertype: ReferenceType)(implicit classHierarchy: ClassHierarchy): Answer
Determines if this value is a subtype of the given supertype by delegating to the
isSubtypeOf(ReferenceType,ReferenceType)method of the domain.Determines if this value is a subtype of the given supertype by delegating to the
isSubtypeOf(ReferenceType,ReferenceType)method of the domain.- Definition Classes
- IsMObjectValue → IsReferenceValue
- Note
This is a very basic implementation that cannot determine that this value is not a subtype of the given type as this implementation does not distinguish between class types and interface types.
- final def isVoid: Boolean
Returns
trueif this value represents void.Returns
trueif this value represents void.- Definition Classes
- KnownTypedValue → ValueInformation
- val leastUpperType: Option[ReferenceType]
The least upper type bound of the value.
The least upper type bound of the value.
Noneif and only if the underlying value isnull.- Definition Classes
- AProperMObjectValue → IsReferenceValue
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toCanonicalForm: IsMObjectValue
Returns a
ValueInformationobject that just captures the basic information as defined by thisvalueframework.Returns a
ValueInformationobject that just captures the basic information as defined by thisvalueframework. The returned value information object will be independent of the underlying representation from which it was derived.- Definition Classes
- AProperMObjectValue → IsMObjectValue → IsBaseReferenceValue → IsReferenceValue → ValueInformation
- def toString(): String
- Definition Classes
- AProperMObjectValue → AnyRef → Any
- val upperTypeBound: UIDSet[ClassType]
All types from which the (precise, but unknown) type of the represented value inherits.
All types from which the (precise, but unknown) type of the represented value inherits. I.e., the value represented by this domain value is known to have a type that (in)directly inherits from all given types at the same time. Hence, the upperTypeBound may contain at most one class type.
- Definition Classes
- AProperMObjectValue → IsMObjectValue → IsReferenceValue
- final def verificationTypeInfo: VerificationTypeInfo
The type of this value as used by the org.opalj.br.StackMapTable attribute.
The type of this value as used by the org.opalj.br.StackMapTable attribute.
- Definition Classes
- IsMObjectValue → ValueInformation
- Exceptions thrown
IllegalStateExceptionif this value represents void or a return address value.
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
- Deprecated