Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package opalj

    OPAL is a Scala-based framework for the static analysis, manipulation and creation of Java bytecode.

    OPAL is a Scala-based framework for the static analysis, manipulation and creation of Java bytecode. OPAL is designed with performance, scalability and adaptability in mind.

    Its main components are:

    • a library (Common) which provides generally useful data-structures and algorithms for static analyses.
    • a framework for implementing lattice based static analyses (Static Analysis Infrastructure)
    • a framework for parsing Java bytecode (Bytecode Infrastructure) that can be used to create arbitrary representations.
    • a library to create a one-to-one in-memory representation of Java bytecode (Bytecode Disassembler).
    • a library to create a representation of Java bytecode that facilitates writing simple static analyses (Bytecode Representation - org.opalj.br).
    • a scalable, easily customizable framework for the abstract interpretation of Java bytecode (Abstract Interpretation Framework - org.opalj.ai).
    • a library to extract dependencies between code elements and to facilitate checking architecture definitions.
    • a library for the lightweight manipulation and creation of Java bytecode (Bytecode Assembler).

    General Design Decisions

    Thread Safety

    Unless explicitly noted, OPAL is thread safe. I.e., the classes defined by OPAL can be considered to be thread safe unless otherwise stated. (For example, it is possible to read and process class files concurrently without explicit synchronization on the client side.)

    No null Values

    Unless explicitly noted, OPAL does not null values I.e., fields that are accessible will never contain null values and methods will never return null. If a method accepts null as a value for a parameter or returns a null value it is always explicitly documented. In general, the behavior of methods that are passed null values is undefined unless explicitly documented.

    No Typecasts for Collections

    For efficiency reasons, OPAL sometimes uses mutable data-structures internally. After construction time, these data-structures are generally represented using their generic interfaces (e.g., scala.collection.{Set,Map}). However, a downcast (e.g., to add/remove elements) is always forbidden as it would effectively prevent thread-safety.

    Assertions

    OPAL makes heavy use of Scala's Assertion Facility to facilitate writing correct code. Hence, for production builds (after thorough testing(!)) it is highly recommend to build OPAL again using -Xdisable-assertions.

    Definition Classes
    org
  • package ai

    Implementation of an abstract interpretation (ai) framework – also referred to as OPAL.

    Implementation of an abstract interpretation (ai) framework – also referred to as OPAL.

    Please note that OPAL/the abstract interpreter just refers to the classes and traits defined in this package (ai). The classes and traits defined in the sub-packages (in particular in domain) are not considered to be part of the core of OPAL/the abstract interpreter.

    Definition Classes
    opalj
    Note

    This framework assumes that the analyzed bytecode is valid; i.e., the JVM's bytecode verifier would be able to verify the code. Furthermore, load-time errors (e.g., LinkageErrors) are – by default – completely ignored to facilitate the analysis of parts of a project. In general, if the presented bytecode is not valid, the result is undefined (i.e., OPAL may report meaningless results, crash or run indefinitely).

    See also

    org.opalj.ai.AI - Implements the abstract interpreter that processes a methods code and uses an analysis-specific domain to perform the abstract computations.

    org.opalj.ai.Domain - The core interface between the abstract interpretation framework and the abstract domain that is responsible for performing the abstract computations.

  • package domain

    This package contains definitions of common domains that can be used for the implementation of analyses.

    This package contains definitions of common domains that can be used for the implementation of analyses.

    Types of Domains

    In general, we distinguish two types of domains. First, domains that define a general interface (on top of the one defined by Domain), but do not directly provide an implementation. Hence, whenever you develop a new Domain you should consider implementing/using these domains to maximize reusability. Second, Domains that implement a specific interface (trait). In this case, we further distinguish between domains that provide a default implementation (per interface only one of these Domains can be used to create a final Domain) and those that can be stacked and basically refine the overall functionality.

    Examples

    • Domains That Define a General Interface
      • Origin defines two types which domains that provide information abou the origin of a value should consider to implement.
      • TheProject defines a standard mechanism how a domain can access the current project.
      • ...
    • Domains That Provide a Default Implementation
    • Domains That Implement Stackable Functionality
      • org.opalj.ai.domain.RecordThrownExceptions records information about all uncaught exceptions by intercepting a Domain's respective methods. However, it does provide a default implementation. Hence, a typical pattern is:
    class MyDomain extends Domain with ...
        with DefaultHandlingOfMethodResults with RecordThrownExceptions

    Thread Safety

    Unless explicitly documented, a domain is never thread-safe. The general programming model is to use one Domain object per code block/method and therefore, thread-safety is not required for Domains that are used for the evaluation of methods. However domains that are used to adapt/transfer values should be thread safe (see org.opalj.ai.domain.ValuesCoordinatingDomain for further details).

    Definition Classes
    ai
  • package l1

    Commonly useful methods.

    Commonly useful methods.

    Definition Classes
    domain
  • trait ClassValues extends StringValues with FieldAccessesDomain with DynamicLoadsDomain with MethodCallsDomain

    Enables the tracking of concrete Class values.

    Enables the tracking of concrete Class values.

    This class overrides invokestatic and only delegates to the default implementation if it cannot successfully handle the call. Hence, this trait needs to be mixed in after the trait that handles the default case but before all other traits that "just" analyze invokestatic calls.

    class MyDomain
     extends DefaultTypeLevelInvokeInstructions
     with ClassValues
     with <DOES ANAYLZE INVOKE CALLS>
    Definition Classes
    l1
  • ANullValue
  • AReferenceValue
  • AnArrayValue
  • AnObjectValue
  • ArrayAbstraction
  • ArrayValue
  • ArrayValueLike
  • ClassValue
  • DomainArrayValue
  • DomainClassValue
  • DomainMultipleReferenceValues
  • DomainNullValue
  • DomainObjectValue
  • DomainReferenceValue
  • DomainSingleOriginReferenceValue
  • DomainSingleOriginReferenceValueOrdering
  • DomainStringValue
  • IllegalValue
  • IsNull
  • IsPrecise
  • MObjectValue
  • MObjectValueLike
  • MultipleReferenceValues
  • NonNullSingleOriginReferenceValue
  • NonNullSingleOriginSReferenceValue
  • NullValue
  • NullValueLike
  • ObjectValue
  • ObjectValueLike
  • RETValue
  • ReferenceValue
  • ReferenceValueLike
  • ReturnAddressValue
  • ReturnAddressValues
  • SObjectValue
  • SObjectValueLike
  • SReferenceValue
  • SingleOriginReferenceValue
  • SingleOriginValueOrdering
  • StringValue
  • TheReferenceValue
  • TypedValue
  • UpperTypeBound
  • Value

trait ClassValue extends (ClassValues.this)#SObjectValue with IsClassValue

All values (Class<...> c) that represent the same type (e.g. java.lang.String) are actually represented by the same class (object) value at runtime.

Attributes
protected
Self Type
(ClassValues.this)#DomainClassValue
Source
ClassValues.scala
Linear Supertypes
IsClassValue, ConstantValueInformationProvider[Type], IsPreciseNonNullReferenceValue, (ClassValues.this)#SObjectValue, (ClassValues.this)#ObjectValue, (ClassValues.this)#NonNullSingleOriginSReferenceValue[ObjectType], (ClassValues.this)#NonNullSingleOriginReferenceValue, (ClassValues.this)#SingleOriginReferenceValue, UID, SingleOriginValue, ValueWithOriginInformation, (ClassValues.this)#TheReferenceValue, (ClassValues.this)#SObjectValueLike, IsSObjectValue, (ClassValues.this)#SReferenceValue[ObjectType], IsSReferenceValue[ObjectType], IsBaseReferenceValue, (ClassValues.this)#AnObjectValue, (ClassValues.this)#ObjectValueLike, (ClassValues.this)#ReferenceValueLike, (ClassValues.this)#ArrayAbstraction, (ClassValues.this)#ReferenceValue, IsReferenceValue, (ClassValues.this)#TypedValue[ReferenceType], KnownTypedValue, KnownValue, (ClassValues.this)#Value, ValueInformation, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ClassValue
  2. IsClassValue
  3. ConstantValueInformationProvider
  4. IsPreciseNonNullReferenceValue
  5. SObjectValue
  6. ObjectValue
  7. NonNullSingleOriginSReferenceValue
  8. NonNullSingleOriginReferenceValue
  9. SingleOriginReferenceValue
  10. UID
  11. SingleOriginValue
  12. ValueWithOriginInformation
  13. TheReferenceValue
  14. SObjectValueLike
  15. IsSObjectValue
  16. SReferenceValue
  17. IsSReferenceValue
  18. IsBaseReferenceValue
  19. AnObjectValue
  20. ObjectValueLike
  21. ReferenceValueLike
  22. ArrayAbstraction
  23. ReferenceValue
  24. IsReferenceValue
  25. TypedValue
  26. KnownTypedValue
  27. KnownValue
  28. Value
  29. ValueInformation
  30. AnyRef
  31. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def origin: ValueOrigin

    The origin of the value (or the pseudo-origin (e.g., the index of the parameter) if the true origin is unknown.)

    The origin of the value (or the pseudo-origin (e.g., the index of the parameter) if the true origin is unknown.)

    Definition Classes
    SingleOriginValue
  2. abstract def refId: (ClassValues.this)#RefId

    Returns the reference id of this object.

    Returns the reference id of this object. I.e., an approximation of the object's identity.

    Definition Classes
    TheReferenceValue
  3. abstract def value: Type
    Definition Classes
    ClassValueIsClassValue

Concrete 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. val AnnotatedElement: ObjectType
    Definition Classes
    IsClassValue
  5. val GenericDeclaration: ObjectType
    Definition Classes
    IsClassValue
  6. final def PCIndependent: Int
    Definition Classes
    Value
    Annotations
    @inline()
  7. val Type: ObjectType
    Definition Classes
    IsClassValue
  8. def abstractOverMutableState(): (ClassValues.this)#AReferenceValue
    Definition Classes
    TheReferenceValue
  9. def abstractsOver(other: (ClassValues.this)#DomainValue): Boolean

    Returns true iff the abstract state represented by this value abstracts over the state of the given value.

    Returns true iff the abstract state represented by this value abstracts over the state of the given value. In other words if every possible runtime value represented by the given value is also represented by this value.

    The abstract state generally encompasses every information that would be considered during a join of this value and the other value and that could lead to a true Update.

    This method is reflexive, I.e., every value abstracts over itself.

    TheIllegalValue only abstracts over itself.

    Definition Classes
    ClassValueSObjectValueSObjectValueLikeValue
    Note

    abstractsOver is only defined for comparable values where both values have the same computational type.

    ,

    The default implementation uses the join method of this domain value. Overriding this method is, hence, primarily meaningful for performance reasons.

    See also

    isMorePreciseThan

  10. def adapt(target: TargetDomain, targetOrigin: ValueOrigin): (target)#DomainValue

    Adapts this value to the given domain (default: throws a domain exception that adaptation is not supported).

    Adapts this value to the given domain (default: throws a domain exception that adaptation is not supported). This method needs to be overridden by concrete Value classes to support the adaptation for a specific domain.

    Supporting the adapt method is primarily necessary when you want to analyze a method that is called by the currently analyzed method and you need to adapt this domain's values (the actual parameters of the method) to the domain used for analyzing the called method.

    Additionally, the adapt method is OPAL's main mechanism to enable dynamic domain-adaptation. I.e., to make it possible to change the abstract domain at runtime if the analysis time takes too long using a (more) precise domain.

    Definition Classes
    ClassValueSObjectValueSObjectValueLikeValue
    Note

    The abstract interpretation framework does not use/call this method. This method is solely predefined to facilitate the development of project-wide analyses.

  11. final def allValues: Iterable[ClassValue.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 not this value.

    Definition Classes
    IsBaseReferenceValueIsReferenceValue
    Note

    Primarily defined as a convenience interface.

  12. def asConstantBoolean: Boolean
  13. def asConstantByte: Byte
  14. def asConstantChar: Char
  15. def asConstantDouble: Double
  16. def asConstantFloat: Float
  17. def asConstantInteger: Integer
  18. def asConstantLong: Long
  19. def asConstantShort: Short
  20. final def asDomainReferenceValue: (ClassValues.this)#DomainReferenceValue

    Returns the represented reference value iff this value represents a reference value.

    Returns the represented reference value iff this value represents a reference value.

    Definition Classes
    ReferenceValueLikeValue
  21. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  22. def asPrimitiveValue: IsPrimitiveValue[_ <: BaseType]
    Definition Classes
    ValueInformation
  23. 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
  24. final def asReferenceValue: IsReferenceValue
    Definition Classes
    IsReferenceValueValueInformation
  25. def asStructuralUpdate(pc: Int, newUpperTypeBound: UIDSet[ObjectType]): Update[(ClassValues.this)#DomainValue]
    Attributes
    protected
    Definition Classes
    AnObjectValue
  26. final def baseValues: Iterable[ClassValue.this.type]

    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
    IsBaseReferenceValueIsReferenceValue
    Note

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

  27. def canEqual(other: (ClassValues.this)#SObjectValue): Boolean
    Attributes
    protected
    Definition Classes
    ClassValueSObjectValue
  28. final def classHierarchy: ClassHierarchy
    Definition Classes
    SReferenceValue
  29. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  30. 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_... 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
    IsReferenceValueValueInformation
    Exceptions thrown

    IllegalStateException if this value is illegal or void.

    Note

    The computational type has to be precise/correct.

  31. def constantValue: Option[Type]

    The constant value that this variable takes - if it take a single constant value! I.e., if the variable may take multiple different values at runtime constantValue will return None.

    The constant value that this variable takes - if it take a single constant value! I.e., if the variable may take multiple different values at runtime constantValue will return None.

    Definition Classes
    IsClassValueConstantValueInformationProvider
  32. def doJoin(joinPC: Int, other: (ClassValues.this)#DomainValue): Update[(ClassValues.this)#DomainValue]

    Joins this value and the given value.

    Joins this value and the given value.

    Join is called whenever an instruction is evaluated more than once and, hence, the values found on the paths need to be joined. This method is, however, only called if the two values are two different objects ((this ne value) === true), but both values have the same computational type.

    This basically implements the join operator of complete lattices.

    Example

    For example, joining a DomainValue that represents the integer value 0 with a DomainValue that represents the integer value 1 may return a new DomainValue that precisely captures the range [0..1] or that captures all positive integer values or just some integer value.

    Contract

    this value is always the value that was previously used to perform subsequent computations/analyses. Hence, if this value subsumes the given value, the result has to be either NoUpdate or a MetaInformationUpdate. In case that the given value subsumes this value, the result has to be a StructuralUpdate with the given value as the new value. Hence, this join operation is not commutative. If a new (more abstract) abstract value is created that represents both values the result always has to be a StructuralUpdate. If the result is a StructuralUpdate the framework will continue with the interpretation.

    The termination of the abstract interpretation directly depends on the fact that at some point all (abstract) values are fixed and don't change anymore. Hence, it is important that the type of the update is only a org.opalj.ai.StructuralUpdate if the value has changed in a way relevant for future computations/analyses involving this value. In other words, when two values are joined it has to be ensured that no fall back to a previous value occurs. E.g., if you join the existing integer value 0 and the given value 1 and the result would be 1, then it must be ensured that a subsequent join with the value 0 will not result in the value 0 again.

    Conceptually, the join of an object with itself has to return the object itself. Note, that this is a conceptual requirement as such a call (this.doJoin(..,this)) will not be performed by the abstract interpretation framework; this case is handled by the join method. However, if the join object is also used by the implementation of the domain itself, it may be necessary to explicitly handle self-joins.

    Performance

    In general, the domain should try to minimize the number of objects that it uses to represent values. That is, two values that are conceptually equal should – whenever possible – use only one object. This has a significant impact on functions such as join.

    Attributes
    protected
    Definition Classes
    SingleOriginReferenceValueValue
  33. def doJoinWithMultipleReferenceValues(pc: Int, other: (ClassValues.this)#DomainMultipleReferenceValues): StructuralUpdate[(ClassValues.this)#DomainMultipleReferenceValues]
    Attributes
    protected
    Definition Classes
    SingleOriginReferenceValue
  34. def doJoinWithNonNullValueWithSameOrigin(joinPC: Int, other: (ClassValues.this)#DomainSingleOriginReferenceValue): Update[(ClassValues.this)#DomainSingleOriginReferenceValue]
  35. final def doJoinWithNullValueWithSameOrigin(joinPC: Int, that: (ClassValues.this)#DomainNullValue): Update[(ClassValues.this)#DomainSingleOriginReferenceValue]
    Attributes
    protected
    Definition Classes
    SingleOriginReferenceValue
  36. def doPeformJoinWithNonNullValueWithSameOrigin(that: (ClassValues.this)#DomainSingleOriginReferenceValue, newRefId: (ClassValues.this)#RefId): (ClassValues.this)#DomainSingleOriginReferenceValue
  37. final def doPropagateRefinement(refinements: (ClassValues.this)#Refinements, operands: (ClassValues.this)#Operands, locals: (ClassValues.this)#Locals): ((ClassValues.this)#Operands, (ClassValues.this)#Locals)
    Attributes
    protected[this]
    Definition Classes
    TheReferenceValue
  38. def doRefineIsNull(isNull: Answer): (ClassValues.this)#DomainSingleOriginReferenceValue
  39. def doRefineUpperTypeBound(supertype: ReferenceType): (ClassValues.this)#DomainSingleOriginReferenceValue
  40. def doRefineUpperTypeBound(supertypes: UIDSet[_ <: ReferenceType]): (ClassValues.this)#DomainSingleOriginReferenceValue
    Definition Classes
    SingleOriginReferenceValue
  41. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  42. def equals(other: Any): Boolean
    Definition Classes
    ClassValueSObjectValue → AnyRef → Any
  43. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  44. final def hasCategory2ComputationalType: Boolean

    Returns true if and only if the value has the computational type 2; false in all other cases (including the case where this value is illegal!).

    Returns true if and only if the value has the computational type 2; false in all other cases (including the case where this value is illegal!).

    Definition Classes
    IsReferenceValueValueInformation
  45. def hashCode(): Int
    Definition Classes
    ClassValueSObjectValue → AnyRef → Any
  46. final def id: Int

    This object's unique id.

    This object's unique id.

    Definition Classes
    SingleOriginReferenceValueUID
  47. final def isArrayValue: Answer

    Returns Yes if the value is _not null_ and the least upper type bound is an ArrayType; the value is Unknown if the least upper type bound is ArrayType but the value may be null; in all other cases No is returned; in particular if the value is known to be null.

    Returns Yes if the value is _not null_ and the least upper type bound is an ArrayType; the value is Unknown if the least upper type bound is ArrayType but the value may be null; in all other cases No is returned; in particular if the value is known to be null. No is also returned if the value's type is Object or Seriablizable or Cloneable.

    Definition Classes
    IsSObjectValueValueInformation
  48. final def isIllegalValue: Boolean

    Returns true iff this value is not a legal value according to the JVM specification.

    Returns true iff 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
    KnownValueValueInformation
    Note

    An IsIllegalValue can always be distinguished from a void value.

  49. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  50. def isMorePreciseThan(other: (ClassValues.this)#DomainValue): Boolean

    Returns true iff the abstract state represented by this value is strictly more precise than the state of the given value.

    Returns true iff the abstract state represented by this value is strictly more precise than the state of the given value. In other words if every possible runtime value represented by this value is also represented by the given value, but both are not equal; in other words, this method is irreflexive.

    The considered abstract state generally encompasses every information that would be considered during a join of this value and the other value and that could lead to a StructuralUpdate.

    other

    Another DomainValue with the same computational type as this value. (The IllegalValue has no computational type and, hence, a comparison with an IllegalValue is not well defined.)

    Definition Classes
    Value
    Note

    It is recommended to overwrite this method for performance reasons, as the default implementation relies on join.

    See also

    abstractsOver

  51. def isNull: No.type

    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.

    Definition Classes
    IsPreciseNonNullReferenceValue → IsReferenceValue
  52. 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.

    Definition Classes
    IsPreciseNonNullReferenceValue → IsReferenceValue
  53. final def isPrimitiveValue: Boolean

    Returns true in case of a value with primitive type.

    Returns true in case of a value with primitive type.

    Definition Classes
    IsReferenceValueValueInformation
    Exceptions thrown

    IllegalStateException if this value is illegal.

  54. final def isReferenceValue: Boolean

    Returns true if the value has a reference type.

    Returns true if the value has a reference type.

    Definition Classes
    IsReferenceValueValueInformation
    Exceptions thrown

    IllegalStateException if this value is illegal.

  55. final def isValueASubtypeOf(supertype: ReferenceType)(implicit classHierarchy: ClassHierarchy): 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.

    Definition Classes
    IsClassValueIsSObjectValueIsReferenceValue
    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. If the value is null, the effect/interpretation of a subtype of query is context dependent (isInstanceOf/checkCast).

  56. final def isVoid: Boolean

    Returns true if this value represents void.

    Returns true if this value represents void.

    Definition Classes
    KnownTypedValueValueInformation
  57. def join(pc: Int, that: (ClassValues.this)#DomainValue): Update[(ClassValues.this)#DomainValue]

    Checks that the given value and this value are compatible with regard to its computational type and – if so – calls doJoin.

    Checks that the given value and this value are compatible with regard to its computational type and – if so – calls doJoin.

    See doJoin(PC,DomainValue) for details.

    pc

    The program counter of the instruction where the paths converge or Int.MinValue if the join is done independently of an instruction.

    that

    The "new" domain value with which this domain value should be joined. The caller has to ensure that the given value and this value are guaranteed to be two different objects.

    returns

    MetaInformationUpdateIllegalValue or the result of calling doJoin.

    Definition Classes
    Value
    Note

    It is in general not recommended/needed to override this method.

  58. final def leastUpperType: Option[ReferenceType]

    The least upper type bound of the value.

    The least upper type bound of the value.

    None if and only if the underlying value is null.

    Definition Classes
    IsSReferenceValueIsReferenceValue
  59. final def length(pc: Int): Computation[(ClassValues.this)#DomainValue, (ClassValues.this)#ExceptionValue]
    Definition Classes
    AnObjectValueArrayAbstraction
  60. final def load(pc: Int, index: (ClassValues.this)#DomainValue): (ClassValues.this)#ArrayLoadResult
    Definition Classes
    AnObjectValueArrayAbstraction
  61. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  62. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  63. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  64. final def origins: ValueOrigins
  65. final def originsIterator: ValueOriginsIterator
  66. final def propagateRefinement(oldValue: (ClassValues.this)#AReferenceValue, newValue: (ClassValues.this)#AReferenceValue, operands: (ClassValues.this)#Operands, locals: (ClassValues.this)#Locals): ((ClassValues.this)#Operands, (ClassValues.this)#Locals)

    Propagate some refinement of the value's properties.

    Propagate some refinement of the value's properties.

    Attributes
    protected[this]
    Definition Classes
    TheReferenceValue
  67. def refineIf(refinements: (ClassValues.this)#Refinements): Boolean

    Returns true - and updates the refinements map - if this value was refined because it depended on a value that was already refined.

    Returns true - and updates the refinements map - if this value was refined because it depended on a value that was already refined.

    returns

    true if a refinement was added to the refinements map.

    Attributes
    protected
    Definition Classes
    SingleOriginReferenceValueTheReferenceValue
    Note

    The refinements map must not contain this value as a key. The template method doPropagateRefinement already applies all standard refinements.

  68. final def refineIsNull(pc: Int, isNull: Answer, operands: (ClassValues.this)#Operands, locals: (ClassValues.this)#Locals): ((ClassValues.this)#Operands, (ClassValues.this)#Locals)

    Refines this value's isNull property.

    Refines this value's isNull property.

    Precondition

    This method is only defined if a previous isNull test returned Unknown and we are now on the branch where we know that the value is now null or is not null.

    pc

    The program counter of the instruction that was the reason for the refinement.

    isNull

    This value's new null-ness property. isNull either has to be Yes or No. The refinement to Unknown neither makes sense nor is it supported.

    returns

    The updated operand stack and register values.

    Definition Classes
    SingleOriginReferenceValueTheReferenceValue
  69. final def refineUpperTypeBound(pc: Int, supertype: ReferenceType, operands: (ClassValues.this)#Operands, locals: (ClassValues.this)#Locals): ((ClassValues.this)#Operands, (ClassValues.this)#Locals)

    Refines the upper bound of this value's type to the given supertype.

    Refines the upper bound of this value's type to the given supertype.

    Precondition

    This method is only to be called if a previous "subtype of" test (this.isValueASubtypeOf(supertype)) returned Unknown and we are now on the branch where the value has to be of the respective type. Hence, this method only handles the case where supertype is more strict than this type's upper type bound.

    returns

    The updated operand stack and register values.

    Definition Classes
    SingleOriginReferenceValueTheReferenceValue
  70. final def store(pc: Int, value: (ClassValues.this)#DomainValue, index: (ClassValues.this)#DomainValue): (ClassValues.this)#ArrayStoreResult
    Definition Classes
    AnObjectValueArrayAbstraction
  71. final def summarize(pc: Int): ClassValue.this.type

    Creates a summary of this value.

    Creates a summary of this value.

    In general, creating a summary of a value may be useful/required for values that are potentially returned by a called method and which will then be used by the calling method. For example, it may be useful to precisely track the flow of values within a method to be able to distinguish between all sources of a value (E.g., to be able to distinguish between a NullPointerException created by instruction A and another one created by instruction B (A != B).)

    However, from the caller perspective it may be absolutely irrelevant where/how the value was created in the called method and, hence, keeping all information would just waste memory and a summary may be sufficient.

    Definition Classes
    SReferenceValueValue
    Note

    This method is predefined to facilitate the development of project-wide analyses.

  72. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  73. final def theUpperTypeBound: ObjectType
    Definition Classes
    IsClassValueIsSReferenceValue
  74. def toCanonicalForm: TheClassValue

    Returns a ValueInformation object that just captures the basic information as defined by this value framework.

    Returns a ValueInformation object that just captures the basic information as defined by this value framework. The returned value information object will be independent of the underlying representation from which it was derived.

    Definition Classes
    ClassValueIsSObjectValueIsBaseReferenceValueIsReferenceValueValueInformation
  75. def toString(): String
    Definition Classes
    ClassValueSObjectValueSReferenceValue → AnyRef → Any
  76. def toString(upperTypeBound: String): String
  77. final def update(origin: ValueOrigin = this.origin, isNull: Answer = this.isNull): (ClassValues.this)#DomainSingleOriginReferenceValue

    Updates the origin and/or isNull property; keeps the reference id.

    Updates the origin and/or isNull property; keeps the reference id.

    Definition Classes
    SingleOriginReferenceValue
  78. def updateRefId(refId: (ClassValues.this)#RefId, origin: ValueOrigin, isNull: Answer): (ClassValues.this)#DomainObjectValue

    Creates a new instance of this object where the reference id is set to the given reference id refId.

    Creates a new instance of this object where the reference id is set to the given reference id refId. Optionally, it is also possible to update the origin and isNull information.

    Definition Classes
    SObjectValueSingleOriginReferenceValue
    Example:
    1. A typical usage:

      val v : SingleOriginReferenceValue = ???
      val newV = v.updateRefId(nextRefId(), isNull = Unknown)
  79. final def upperTypeBound: UIDSet[ObjectType]

    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
    IsSReferenceValueIsReferenceValue
    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.

  80. 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
    IsClassValueIsSObjectValueValueInformation
    Exceptions thrown

    IllegalStateException if this value represents void or a return address value.

  81. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  82. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  83. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from IsClassValue

Inherited from IsPreciseNonNullReferenceValue

Inherited from (ClassValues.this)#SObjectValue

Inherited from (ClassValues.this)#ObjectValue

Inherited from (ClassValues.this)#NonNullSingleOriginSReferenceValue[ObjectType]

Inherited from (ClassValues.this)#NonNullSingleOriginReferenceValue

Inherited from (ClassValues.this)#SingleOriginReferenceValue

Inherited from UID

Inherited from SingleOriginValue

Inherited from (ClassValues.this)#TheReferenceValue

Inherited from (ClassValues.this)#SObjectValueLike

Inherited from IsSObjectValue

Inherited from (ClassValues.this)#SReferenceValue[ObjectType]

Inherited from IsBaseReferenceValue

Inherited from (ClassValues.this)#AnObjectValue

Inherited from (ClassValues.this)#ObjectValueLike

Inherited from (ClassValues.this)#ReferenceValueLike

Inherited from (ClassValues.this)#ArrayAbstraction

Inherited from (ClassValues.this)#ReferenceValue

Inherited from IsReferenceValue

Inherited from (ClassValues.this)#TypedValue[ReferenceType]

Inherited from KnownTypedValue

Inherited from KnownValue

Inherited from (ClassValues.this)#Value

Inherited from ValueInformation

Inherited from AnyRef

Inherited from Any

Ungrouped