Packages

final case class ConstantString(value: String) extends ConstantFieldValue[String] with IsStringValue with Product with Serializable

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConstantString
  2. Serializable
  3. Product
  4. Equals
  5. IsStringValue
  6. ConstantValueInformationProvider
  7. IsPreciseNonNullReferenceValue
  8. IsSObjectValue
  9. IsSReferenceValue
  10. IsBaseReferenceValue
  11. IsReferenceValue
  12. ConstantFieldValue
  13. KnownTypedValue
  14. KnownValue
  15. ValueInformation
  16. ConstantValue
  17. BootstrapArgument
  18. Attribute
  19. AnyRef
  20. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ConstantString(value: String)

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: Iterable[ConstantString.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.

  5. def asConstantBoolean: Boolean
  6. def asConstantByte: Byte
  7. def asConstantChar: Char
  8. def asConstantDouble: Double
  9. def asConstantFloat: Float
  10. def asConstantInteger: Integer
  11. def asConstantLong: Long
  12. def asConstantShort: Short
  13. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  14. def asPrimitiveValue: IsPrimitiveValue[_ <: BaseType]
    Definition Classes
    ValueInformation
  15. 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
  16. final def asReferenceValue: IsReferenceValue
    Definition Classes
    IsReferenceValueValueInformation
  17. final def baseValues: Iterable[ConstantString.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.

  18. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  19. 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.

  20. def constantValue: Option[String]

    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
    ConstantStringIsStringValueConstantValueInformationProvider
  21. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  23. 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
  24. 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
  25. 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.

  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. 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
  28. 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
  29. 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.

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

  31. 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
    IsStringValueIsSObjectValueIsReferenceValue
    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).

  32. final def isVoid: Boolean

    Returns true if this value represents void.

    Returns true if this value represents void.

    Definition Classes
    KnownTypedValueValueInformation
  33. def kindId: Int

    Returns the unique ID that identifies this kind of attribute (Signature, LineNumberTable, ...)

    Returns the unique ID that identifies this kind of attribute (Signature, LineNumberTable, ...)

    This id can then be used in a switch statement to efficiently identify the attribute.

    (attribute.id : @scala.annotation.switch) match {
         case Signature.Id => ...
    }

    Associating Unique Id

    The unique ids are manually associated with the attributes. The attributes use the following IDs:

    • (-1 Unknown Attribute)
    • 1-5 The ConstantValue Attribute
    • 6 The Code Attribute
    • 7 The StackMapTable Attribute
    • 8 The Exceptions Attribute
    • 9 The InnerClasses Attribute
    • 10 The EnclosingMethod Attribute
    • 11 The Synthetic Attribute
    • 12-16 The Signature Attribute
    • 17 The SourceFile Attribute
    • 18 The SourceDebugExtension Attribute
    • 19 The LineNumberTable Attribute
    • 20 The LocalVariableTable Attribute
    • 21 The LocalVariableTypeTable Attribute
    • 22 The Deprecated Attribute
    • 23 The RuntimeVisibleAnnotations Attribute
    • 24 The RuntimeInvisibleAnnotations Attribute
    • 25 The RuntimeVisibleParameterAnnotations Attribute
    • 26 The RuntimeInvisibleParameterAnnotations Attribute
    • 27 The RuntimeVisibleTypeAnnotations Attribute
    • 28 The RuntimeInvisibleTypeAnnotations Attribute
    • 29-41 The AnnotationDefault Attribute
    • 42 The BootstrapMethods Attribute
    • 43 The MethodParameters Attribute
    • 44 The Module Attribute (Java 9)
    • 45 The ModuleMainClass Attribute (Java 9)
    • 46 The ModulePackages Attribute (Java 9)
    • 47 The NestHost Attribute (Java 11)
    • 48 The NestMembers Attribute (Java 11)
    • 49 The Record Attribute (Java 16)
    • 1001 OPAL's VirtualTypeFlag Attribute
    • 1002 OPAL's SynthesizedClassFiles Attribute
    • 1003 OPAL's TACode Attribute (the 3-Address Code)
    Definition Classes
    ConstantStringAttribute
  34. 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
  35. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  36. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  37. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  38. def productElementNames: Iterator[String]
    Definition Classes
    Product
  39. def runtimeValueType: String.type

    The (runtime) type of the concrete value.

    The (runtime) type of the concrete value.

    Definition Classes
    ConstantStringConstantValue
  40. def similar(other: Attribute, config: SimilarityTestConfiguration): Boolean

    Returns true if this attribute and the given one are guaranteed to be indistinguishable at runtime.

    Returns true if this attribute and the given one are guaranteed to be indistinguishable at runtime.

    Definition Classes
    ConstantFieldValueAttribute
    Note

    If this class is implemented as a proper case class, this method can often be implemented by forwarding to the default equals method.

  41. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  42. final def theUpperTypeBound: ObjectType
    Definition Classes
    IsStringValueIsSReferenceValue
  43. def toBoolean: Boolean
    Definition Classes
    ConstantValue
  44. def toByte: Byte
    Definition Classes
    ConstantValue
  45. def toCanonicalForm: IsStringValue

    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
    ConstantStringIsSObjectValueIsBaseReferenceValueIsReferenceValueValueInformation
  46. def toChar: Char
    Definition Classes
    ConstantValue
  47. def toDouble: Double
    Definition Classes
    ConstantValue
  48. def toFloat: Float
    Definition Classes
    ConstantValue
  49. def toInt: Int
    Definition Classes
    ConstantValue
  50. def toJava: String
    Definition Classes
    ConstantStringBootstrapArgument
  51. def toLong: Long
    Definition Classes
    ConstantValue
  52. def toReferenceType: ReferenceType
    Definition Classes
    ConstantValue
  53. def toShort: Short
    Definition Classes
    ConstantValue
  54. def toUTF8: String
    Definition Classes
    ConstantStringConstantValue
  55. 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.

  56. val value: String

    The concrete value.

    The concrete value.

    Definition Classes
    ConstantStringIsStringValueConstantValue
  57. def valueToString: String

    A string representation of the concrete value; used for debugging purposes.

    A string representation of the concrete value; used for debugging purposes.

    Definition Classes
    ConstantStringConstantValue
  58. 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
    IsStringValueIsSObjectValueValueInformation
    Exceptions thrown

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

  59. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  60. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  61. 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 Serializable

Inherited from Product

Inherited from Equals

Inherited from IsStringValue

Inherited from ConstantValueInformationProvider[String]

Inherited from IsPreciseNonNullReferenceValue

Inherited from IsSObjectValue

Inherited from IsBaseReferenceValue

Inherited from IsReferenceValue

Inherited from ConstantFieldValue[String]

Inherited from KnownTypedValue

Inherited from KnownValue

Inherited from ValueInformation

Inherited from ConstantValue[String]

Inherited from BootstrapArgument

Inherited from Attribute

Inherited from AnyRef

Inherited from Any

Ungrouped