The atype value of the base type.
The atype value of the base type. The atype value uniquely identifies a base type and is used primarily by the [instruction.NEWARRAY] instruction.
The computational type of values of this type.
The computational type of values of this type.
Returns the instruction sequence that can convert a value of the current
type to targetType.
Returns the instruction sequence that can convert a value of the current
type to targetType.
For primitive values the appropriate instructions that perform the necessary widening/narrowing are returned. If this type is a primitive type and the target type is a wrapper type, then the object of the corresponding wrapper type is created and returned.
The functionality implemented here, basically implements the logic for handling boxing and unboxing operations.
The unique id of this type.
The unique id of this type. Types are associated with globally unique ids to make it easy to define a global order.
Determines if the range of values captured by this type is a strict
superset of the range of values captured by values of type targetType.
Determines if the range of values captured by this type is a strict
superset of the range of values captured by values of type targetType. Here,
strict superset means that – except of rounding issues – the value is conceptually
representable by this type. For example, a conversion from a long value to a
double value may loose some precision related to the least significant bits,
but the value is still representable.
In general, the result of isWiderThan is comparable to the result of determing
if a conversion of a value of this type to the given type is an explicit/implicit
widening conversion.
assert(IntegerType.isWiderThan(IntegerType) == false) assert(IntegerType.isWiderThan(LongType) == false) assert(IntegerType.isWiderThan(ByteType) == true) assert(LongType.isWiderThan(FloatType) == false) assert(ByteType.isWiderThan(CharType) == false) assert(LongType.isWiderThan(ShortType) == true)
Returns the binary name of this type as used by the Java runtime.
Returns the binary name of this type as used by the Java runtime. Basically
returns the same name as produced by Class.getName.
Returns the representation of this type as used by the JVM in, for example, method descriptors or signatures.
Returns the representation of this type as used by the JVM in, for example, method descriptors or signatures.
A String representation of this type as it would be used in Java source code.
A String representation of this type as it would be used in Java source code.
Returns the Java class object representing this type.
Returns the Java class object representing this type.
This is generally only useful in very special cases and – to be meaningful at all – it is necessary that the class path used for running the static analysis also contains the classes that are analyzed. This is (often) only the case for the JDK.
However, one example where this is useful is the creation of a real object of
a specific type and to use that object when a method is called on that object.
This avoids the reimplementation of the respective logic as part of the analysis.
For example, if you want to get the String that is created by a specific
StringBuffer it is possible to implement the API of StringBuffer as part of
your analysis or (probably more efficient) to just create an instance of a
StringBuffer object and to redirect every call to the real object. In this case
only some general logic is required to redirect calls and to convert the values
between the representation used by the analysis and the representation required
by the called method.
Returns the sequence of instructions that adapts values of this type to values
of the target type.
Compares this type with the given type.
Compares this type with the given type.
Comparison of types is implemented by comparing the associated ids. I.e., the result of the comparison of two types is not stable across multiple runs of OPAL.
Returns true if this type is a base type (also called primitive type).
Returns true if this type is the primitive type boolean.
Returns true if this type is the primitive type boolean.
Returns true if this type is the primitive type byte.
Returns true if this type is the primitive type byte.
Returns true if this type is the primitive type char (Range: [0..65535].
Returns true if this type is the primitive type char (Range: [0..65535].
Returns true if this type is the primitive type double.
Returns true if this type is the primitive type double.
Returns true if this type can be used by fields.
Returns true if this type is the primitive type float.
Returns true if this type is the primitive type float.
Returns true if this type is the primitive type int.
Returns true if this type is the primitive type int.
Returns true if this type is the primitive type long.
Returns true if this type is the primitive type long.
Returns true if this type is a reference type; that is, an array type or an
object type (class/interface type).
Returns true if this type is a reference type; that is, an array type or an
object type (class/interface type).
In general, we can distinguish the following three categories of types:
Returns true if this type is the primitive type short.
Returns true if this type is the primitive type short.
Returns true if this type represents void; false otherwise.
Returns true if this type represents void; false otherwise.
The number of operand stack slots/registers required to store a single value of this type.
The number of operand stack slots/registers required to store
a single value of this type. In case of VoidType 0 is returned.
Converts this signature into its JVM representation.
Converts this signature into its JVM representation. (See the JVM 5 or later specification for further details.)
An IntLikeType is every type (byte, char, short and int) that uses a primtive int to store the current value and which has explicit support in the JVM.
Booleanvalues are (at least conceptually) also stored in ints. However, the JVM has basically no explicit support for booleans (e.g., a conversion of an int value to a boolean is not directly supported).