Packages

package br

In this representation of Java bytecode references to a Java class file's constant pool and to attributes are replaced by direct references to the corresponding constant pool entries. This facilitates developing analyses and fosters comprehension.

Based on the fact that indirect references to constant pool entries are resolved and replaced by direct references this representation is called the resolved representation.

This representation of Java bytecode is considered as OPAL's standard representation for writing Scala based analyses. This representation is engineered such that it facilitates writing analyses that use pattern matching.

Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. br
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package analyses

    Defines commonly useful type aliases.

  2. package cfg
  3. package collection
  4. package cp

    Implementation of classes to represent/recreate a class file's constant pool.

  5. package fpcf
  6. package instructions

    Common instruction sequences.

  7. package reader

    Defines convenience methods related to reading in class files.

Type Members

  1. case class Annotation(annotationType: FieldType, elementValuePairs: ElementValuePairs = NoElementValuePairs) extends AnnotationLike with Product with Serializable

    An annotation of a class, field, method or method parameter.

    An annotation of a class, field, method or method parameter.

    Annotations are associated with a class, field, or method using the attribute org.opalj.br.RuntimeInvisibleAnnotationTable or org.opalj.br.RuntimeVisibleAnnotationTable.

    Annotations are associated with a method parameter using the attribute org.opalj.br.RuntimeInvisibleParameterAnnotationTable or a org.opalj.br.RuntimeVisibleParameterAnnotationTable.

  2. abstract class AnnotationLike extends AnyRef

    An annotation of a code entity.

    An annotation of a code entity.

    Annotations are associated with a class, field, method, type etc. using the respective attributes.

  3. trait AnnotationTable extends Attribute

    The runtime (in)visible annotations of a class, method, or field.

    The runtime (in)visible annotations of a class, method, or field.

    Note

    At the JVM level, repeating annotations (as supported by Java 8) (http://docs.oracle.com/javase/tutorial/java/annotations/repeating.html) have no explicit support.

  4. case class AnnotationValue(annotation: Annotation) extends ElementValue with Product with Serializable
  5. type Annotations = ArraySeq[Annotation]
  6. final case class AppendFrame(frameType: Int, offsetDelta: Int, verificationTypeInfoLocals: VerificationTypeInfoLocals) extends StackMapFrame with Product with Serializable
  7. final class ArrayType extends ReferenceType

    Represents an array type.

    Represents an array type.

    Comparing ArrayTypes

    To facilitate comparisons of (array) types, each array type is represented at any given time, by exactly one instance of ArrayType.

    General Information

    From the JVM specification

    An array type consists of a component type with a single dimension (whose length is not given by the type). The component type of an array type may itself be an array type. If, starting from any array type, one considers its component type, and then (if that is also an array type) the component type of that type, and so on, eventually one must reach a component type that is not an array type; this is called the element type of the array type. The element type of an array type is necessarily either a primitive type, or a class type, or an interface type.

  8. case class ArrayTypeSignature(typeSignature: TypeSignature) extends Signature with FieldTypeSignature with Product with Serializable

    See also

    For matching signatures see Signature.

  9. case class ArrayValue(values: ElementValues) extends ElementValue with Product with Serializable
  10. trait Attribute extends AnyRef

    A class file attribute.

    A class file attribute.

    Note

    Some class file attributes are skipped or resolved while loading the class file and hence, are no longer represented at runtime.

  11. type Attributes = ArraySeq[Attribute]
  12. sealed trait BaseType extends FieldType with TypeSignature
  13. sealed trait BaseTypeElementValue extends ElementValue

    Common super trait of all element values with a primitive base type.

  14. sealed abstract class BooleanType extends BaseType with CTIntType

    The type of boolean values (true=1, false=0).

    The type of boolean values (true=1, false=0).

    Though the JVM internally uses an int value to store a boolean value the VM offers no special further support for handling booleans. In particular the conversion of some "byte|short|char|int" value to an int value is not directly supported.

  15. case class BooleanValue(value: Boolean) extends BaseTypeElementValue with Product with Serializable
  16. trait BootstrapArgument extends AnyRef

    A marker trait to identify those constant pool values that can be arguments of boot strap methods.

  17. type BootstrapArguments = ArraySeq[BootstrapArgument]
  18. case class BootstrapMethod(handle: MethodHandle, arguments: BootstrapArguments) extends Product with Serializable

    Java 7's 'BootstrapMethod'.

  19. case class BootstrapMethodTable(methods: BootstrapMethods) extends Attribute with Product with Serializable

    Java 7's BootstrapMethods_attribute.

  20. type BootstrapMethods = ArraySeq[BootstrapMethod]
  21. sealed abstract class ByteType extends IntLikeType
  22. case class ByteValue(value: Byte) extends BaseTypeElementValue with Product with Serializable
  23. sealed trait CTIntType extends Type

    All values which are stored in a value with computational type integer.

  24. sealed abstract class CharType extends IntLikeType
  25. case class CharValue(value: Char) extends BaseTypeElementValue with Product with Serializable
  26. sealed trait ChopFrame extends StackMapFrame
  27. final case class ChopFrame248(offsetDelta: Int) extends StackMapFrame with ChopFrame with Product with Serializable
  28. final case class ChopFrame249(offsetDelta: Int) extends StackMapFrame with ChopFrame with Product with Serializable
  29. final case class ChopFrame250(offsetDelta: Int) extends StackMapFrame with ChopFrame with Product with Serializable
  30. final class ClassFile extends ConcreteSourceElement

    Represents a single class file which either defines a class type or an interface type.

    Represents a single class file which either defines a class type or an interface type. (Annotation types are also interface types and Enums are class types.)

    Note

    Equality of ClassFile objects is reference based and a class file's hash code is the same as the underlying ObjectType's hash code; i.e., ' thisType's hash code.

  31. trait ClassFileAttributeBuilder extends AnyRef

    Given a class files' main elements the attribute is build.

    Given a class files' main elements the attribute is build.

    See also

    The BytecodeAssember framework for an example usage.

  32. trait ClassFileRepository extends AnyRef

    Enables the lookup of ClassFiles.

  33. class ClassHierarchy extends AnyRef

    Represents a project's class hierarchy.

    Represents a project's class hierarchy. The class hierarchy only contains information about those classes that were explicitly added to it. Hence, the class hierarchy may contain holes. However, the type java.lang.Object is always part of the class hierarchy.

    Thread safety

    This class is effectively immutable; concurrent access to the class hierarchy is supported.

    Note

    Java 9 module definitions are completely ignored.

    ,

    Unless explicitly documented, it is an error to pass an instance of ObjectType to any method if the ObjectType was not previously added. If in doubt, first check if the type is known (isKnown/ifKnown).

  34. trait ClassMember extends ConcreteSourceElement

    Abstractions over the common properties of class members (Methods and Fields).

  35. case class ClassSignature(formalTypeParameters: List[FormalTypeParameter], superClassSignature: ClassTypeSignature, superInterfacesSignature: List[ClassTypeSignature]) extends Signature with Product with Serializable

    See also

    For matching signatures see Signature.

  36. case class ClassTypeSignature(packageIdentifier: Option[String], simpleClassTypeSignature: SimpleClassTypeSignature, classTypeSignatureSuffix: List[SimpleClassTypeSignature]) extends Signature with FieldTypeSignature with ThrowsSignature with Product with Serializable

    See also

    For matching signatures see Signature.

  37. case class ClassValue(value: Type) extends ElementValue with Product with Serializable
  38. type Classes = ArraySeq[ObjectType]
  39. final class Code extends Attribute with CommonAttributes with InstructionsContainer with CodeSequence[Instruction] with Iterable[PCAndInstruction]

    Representation of a method's code attribute, that is, representation of a method's implementation.

  40. case class CodeAnalysisFailedException(message: String, code: Code, pc: PC) extends RuntimeException with Product with Serializable

    Exception that is thrown when an analysis of a method's implementation has failed.

    Exception that is thrown when an analysis of a method's implementation has failed.

    message

    The message that describes the reason.

    code

    The code block for which the analysis failed.

    pc

    The program counter of the last instruction that was tried to analyze.

  41. trait CodeAttribute extends Attribute

    Attributes which are referred to by the code attribute.

  42. trait CodeAttributeBuilder[T] extends AnyRef

    Given a method's signature and access flags the code attribute is build and some meta information - depending on the type of the code attribute builder - is collected.

    Given a method's signature and access flags the code attribute is build and some meta information - depending on the type of the code attribute builder - is collected.

    See also

    The BytecodeAssember framework for an example usage.

  43. trait CodeSequence[Instruction <: AnyRef] extends AnyRef

    A sequence of instructions; (currently) the common super trait of org.opalj.tac.TACStmts and org.opalj.br.Code)

    A sequence of instructions; (currently) the common super trait of org.opalj.tac.TACStmts and org.opalj.br.Code)

    Instruction

    The type of instructions.

  44. trait CommonAttributes extends AnyRef

    Defines methods to return common attributes from the attributes table of ClassFile, Field, Method and Code declarations.

  45. trait CommonSourceElementAttributes extends CommonAttributes

    Defines methods to return common attributes from the attributes table of ClassFile, Field and Method declarations.

  46. case class CompactLineNumberTable(rawLineNumbers: Array[Byte]) extends LineNumberTable with Product with Serializable

    A method's line number table.

    A method's line number table.

    rawLineNumbers

             LineNumberTable_attribute {
                 DATA:
                 {   u2 start_pc;
                     u2 line_number;
                 }
             }
    
    The array must not be mutated by callers!

  47. class CompareAllConfiguration extends SimilarityTestConfiguration
  48. sealed abstract class ComputationalType extends AnyRef

    The computational type of a value on the operand stack.

    The computational type of a value on the operand stack.

    (cf. JVM Spec. 2.11.1 Types and the Java Virtual Machine).

  49. sealed abstract class ComputationalTypeCategory extends AnyRef

    The computational type category of a value on the operand stack.

    The computational type category of a value on the operand stack.

    (cf. JVM Spec. 2.11.1 Types and the Java Virtual Machine).

  50. trait ConcreteSourceElement extends SourceElement

    We treat as a source element every entity that can be referred to by other class files.

  51. final case class ConstantClass(value: ReferenceType) extends ConstantValue[ReferenceType] with Product with Serializable

    Represents a class or interface.

    Represents a class or interface.

    ConstantClass is, e.g., used by anewarray and multianewarray instructions. A ConstantClass value is never a Field value. I.e., it is never used to set the value of a static final field.

  52. final case class ConstantDouble(value: Double) extends ConstantFieldValue[Double] with IsDoubleValue with Product with Serializable
  53. sealed abstract class ConstantFieldValue[T] extends Attribute with ConstantValue[T] with KnownTypedValue

    A representation of the constant value of a field.

  54. final case class ConstantFloat(value: Float) extends ConstantFieldValue[Float] with IsFloatValue with Product with Serializable
  55. final case class ConstantInteger(value: Int) extends ConstantFieldValue[Int] with IsIntegerValue with Product with Serializable
  56. final case class ConstantLong(value: Long) extends ConstantFieldValue[Long] with IsLongValue with Product with Serializable
  57. final case class ConstantString(value: String) extends ConstantFieldValue[String] with IsStringValue with Product with Serializable
  58. trait ConstantValue[T] extends BootstrapArgument

    Represents constant values; that is, values pushed onto the stack by the ldc(2)(_w) instructions or type information required by the instructions to create arrays.

    Represents constant values; that is, values pushed onto the stack by the ldc(2)(_w) instructions or type information required by the instructions to create arrays.

    Note

    A MethodHandle or MethodType (i.e., a MethodDescriptor) is also a ConstantValue.

  59. sealed abstract class ContravariantIndicator extends VarianceIndicator

    A declaration such as <? super Entry> is represented in class file signatures by the ContravariantIndicator ("? super") and a FieldTypeSignature.

    A declaration such as <? super Entry> is represented in class file signatures by the ContravariantIndicator ("? super") and a FieldTypeSignature.

    See also

    For matching signatures see Signature.

  60. sealed abstract class CovariantIndicator extends VarianceIndicator

    If you have a declaration such as <? extends Entry> then the "? extends" part is represented by the CovariantIndicator.

    If you have a declaration such as <? extends Entry> then the "? extends" part is represented by the CovariantIndicator.

    See also

    For matching signatures see Signature.

  61. sealed abstract class DeclaredMethod extends AnyRef

    Represents a declared method of a class identified by declaringClassType; that is, a method which belongs to the API of the class itself or a super class thereof.

  62. final class DefinedMethod extends DeclaredMethod

    Represents a declared method; i.e., a method which belongs to the (public and private) API of a class along with a reference to the original declaration.

  63. sealed abstract class DoubleType extends NumericType
  64. case class DoubleValue(value: Double) extends BaseTypeElementValue with Product with Serializable
  65. final class DynamicConstant extends ConstantValue[Any]

    Represents a dynamic constant.

    Represents a dynamic constant.

    DynamicConstant is used to represent dynamic constant arguments of bootstrap methods.

  66. sealed trait ElementValue extends Attribute

    An element value represents an annotation's value or an annonation's default value; depending on the context in which it is used.

  67. case class ElementValuePair(name: String, value: ElementValue) extends Product with Serializable

    An annotation's name-value pair.

  68. type ElementValuePairs = ArraySeq[ElementValuePair]
  69. type ElementValues = ArraySeq[ElementValue]
  70. case class EnclosingMethod(clazz: ObjectType, name: Option[String], descriptor: Option[MethodDescriptor]) extends Attribute with Product with Serializable

    The optional enclosing method attribute of a class.

    The optional enclosing method attribute of a class.

    name

    The name of the enclosing method. The name is optional, but if defined, the descriptor also has to be defined.

    descriptor

    The method descriptor of the enclosing method. The descriptor is optional, but if defined, the name also has to be defined.

  71. case class EnumValue(enumType: ObjectType, constName: String) extends ElementValue with Product with Serializable
  72. case class ExceptionHandler(startPC: Int, endPC: Int, handlerPC: Int, catchType: Option[ObjectType]) extends Product with Serializable

    An entry in the exceptions table of a org.opalj.br.Code block.

    An entry in the exceptions table of a org.opalj.br.Code block.

    startPC

    A valid index into the code array. It points to the first instruction in the "try-block" (inclusive).

    endPC

    An index into the code array that points to the instruction after the "try-block" (exclusive).

    handlerPC

    Points to the first instruction of the exception handler.

    catchType

    The type of the exception that is catched. None in case of a finally block.

  73. type ExceptionHandlers = ArraySeq[ExceptionHandler]
  74. case class ExceptionTable(exceptions: Exceptions) extends Attribute with Product with Serializable

    Attribute in a method's attributes table that declares the (checked) exceptions that may be thrown by the method.

  75. type Exceptions = ArraySeq[ObjectType]
  76. case class Exports(exports: String, flags: Int, exportsTo: ArraySeq[String]) extends Product with Serializable

    exports

    Name of an exported package in internal form.

    exportsTo

    List of names of modules whose code can access the public types in this exported package (in internal form).

  77. final class Field extends JVMField
  78. sealed abstract class FieldAccessMethodHandle extends MethodHandle
  79. trait FieldAttributeBuilder extends AnyRef

    Given a field's information a (final) attribute related to the field is build.

  80. case class FieldIdentifier(declaringObjectType: ObjectType, fieldName: String) extends StructureIdentifier with Product with Serializable
  81. sealed abstract class FieldReadAccessMethodHandle extends FieldAccessMethodHandle
  82. final class FieldTemplate extends JVMField
  83. type FieldTemplates = ArraySeq[FieldTemplate]
  84. sealed trait FieldType extends Type

    Supertype of all types except VoidType.

  85. sealed trait FieldTypeSignature extends Signature with TypeSignature

    See also

    For matching signatures see Signature.

  86. type FieldTypes = ArraySeq[FieldType]
  87. sealed abstract class FieldWriteAccessMethodHandle extends FieldAccessMethodHandle
  88. type Fields = ArraySeq[Field]
  89. sealed abstract class FloatType extends NumericType
  90. case class FloatValue(value: Float) extends BaseTypeElementValue with Product with Serializable
  91. case class FormalTypeParameter(identifier: String, classBound: Option[FieldTypeSignature], interfaceBound: List[FieldTypeSignature]) extends Product with Serializable

    See also

    For matching signatures see Signature.

  92. final case class FullFrame(offsetDelta: Int, verificationTypeInfoLocals: VerificationTypeInfoLocals, verificationTypeInfoStack: VerificationTypeInfoStack) extends StackMapFrame with Product with Serializable
  93. case class GetFieldMethodHandle(declaringClassType: ObjectType, name: String, fieldType: FieldType) extends FieldReadAccessMethodHandle with Product with Serializable
  94. case class GetStaticMethodHandle(declaringClassType: ObjectType, name: String, fieldType: FieldType) extends FieldReadAccessMethodHandle with Product with Serializable
  95. case class InnerClass(innerClassType: ObjectType, outerClassType: Option[ObjectType], innerName: Option[String], innerClassAccessFlags: Int) extends Product with Serializable
  96. case class InnerClassTable(innerClasses: InnerClasses) extends Attribute with Product with Serializable

    Attribute in a class' attribute table that encodes information about inner classes.

  97. type InnerClasses = ArraySeq[InnerClass]
  98. type InstructionLabels = ArraySeq[InstructionLabel]
  99. type Instructions = Array[Instruction]
  100. trait InstructionsContainer extends AnyRef

    Common interface of all elements that have (at most one) sequence of instructions.

  101. sealed abstract class IntLikeType extends NumericType with CTIntType

    An IntLikeType is every type (byte, char, short and int) that uses a primitive int to store the current value and which has explicit support in the JVM.

    An IntLikeType is every type (byte, char, short and int) that uses a primitive int to store the current value and which has explicit support in the JVM.

    Note

    Boolean values 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).

  102. case class IntValue(value: Int) extends BaseTypeElementValue with Product with Serializable
  103. sealed abstract class IntegerType extends IntLikeType
  104. type Interfaces = ArraySeq[ObjectType]
  105. case class InvokeInterfaceMethodHandle(receiverType: ReferenceType, name: String, methodDescriptor: MethodDescriptor) extends MethodCallMethodHandle with Product with Serializable
  106. case class InvokeSpecialMethodHandle(receiverType: ReferenceType, isInterface: Boolean, name: String, methodDescriptor: MethodDescriptor) extends MethodCallMethodHandle with Product with Serializable
  107. case class InvokeStaticMethodHandle(receiverType: ReferenceType, isInterface: Boolean, name: String, methodDescriptor: MethodDescriptor) extends MethodCallMethodHandle with Product with Serializable
  108. case class InvokeVirtualMethodHandle(receiverType: ReferenceType, name: String, methodDescriptor: MethodDescriptor) extends MethodCallMethodHandle with Product with Serializable
  109. sealed abstract class JVMField extends ClassMember with Ordered[JVMField]

    Represents a single field declaration/definition.

    Represents a single field declaration/definition.

    Note

    Fields, which are directly created, have no link to "their defining" ClassFile. This link is implicitly established when a method is added to a ClassFile. This operation also updates the field object.

    ,

    Identity (w.r.t. equals/hashCode) is intentionally by reference (default behavior).

  110. sealed abstract class JVMMethod extends ClassMember with Ordered[JVMMethod] with InstructionsContainer

    Represents a single method.

    Represents a single method.

    Method objects are constructed using the companion object's factory methods.

    Note

    Methods, which are directly created, have no link to "their defining" ClassFile. This link is implicitly established when a method is added to a ClassFile. This operation also updates the method object. Hence, an empty method/constructor which is identical across multiple classes can be reused.

    ,

    Equality of methods is – by purpose – reference based.

  111. case class LineNumber(startPC: PC, lineNumber: Int) extends Product with Serializable

    An entry in a line number table.

  112. trait LineNumberTable extends CodeAttribute

    A method's line number table.

  113. type LineNumbers = ArraySeq[LineNumber]
  114. type LiveVariables = Array[BitArraySet]
  115. case class LocalVariable(startPC: PC, length: Int, name: String, fieldType: FieldType, index: Int) extends Product with Serializable

    An entry in a local variable table.

  116. case class LocalVariableTable(localVariables: LocalVariables) extends CodeAttribute with Product with Serializable

    Representation of the local variable table.

  117. case class LocalVariableType(startPC: PC, length: Int, name: String, signature: FieldTypeSignature, index: Int) extends Product with Serializable
  118. case class LocalVariableTypeTable(localVariableTypes: LocalVariableTypes) extends CodeAttribute with Product with Serializable

    Representation of the local variable type table.

  119. type LocalVariableTypes = ArraySeq[LocalVariableType]
  120. type LocalVariables = ArraySeq[LocalVariable]
  121. case class LocalvarTableEntry(startPC: Int, length: Int, index: Int) extends Product with Serializable

    The local variable is valid in the range [start_pc, start_pc + length).

  122. sealed abstract class LongType extends NumericType
  123. case class LongValue(value: Long) extends BaseTypeElementValue with Product with Serializable
  124. final class Method extends JVMMethod

    A method belonging to a class file.

    A method belonging to a class file. Method objects are created by creating a class file using MethodTemplates.

  125. trait MethodAttributeBuilder extends AnyRef

    Given a method's signature and access flags the attribute related to the method is build.

    Given a method's signature and access flags the attribute related to the method is build.

    See also

    The BytecodeAssember framework for an example usage.

  126. sealed abstract class MethodCallMethodHandle extends MethodHandle
  127. sealed abstract class MethodDescriptor extends ConstantValue[MethodDescriptor] with (Int) => FieldType with Ordered[MethodDescriptor]

    A method descriptor represents the parameters that the method takes and the value that it returns.

    A method descriptor represents the parameters that the method takes and the value that it returns.

    Note

    The equals(Any):Boolean method takes the number of parameters and types into account. I.e., two method descriptor objects are equal if they have the same number of parameters and each parameter has the same Type.

  128. type MethodDescriptors = ArraySeq[MethodDescriptor]
  129. sealed abstract class MethodHandle extends ConstantValue[MethodHandle]

    A method handle.

  130. case class MethodIdentifier(declaringReferenceType: ReferenceType, methodName: String, methodDescriptor: MethodDescriptor) extends StructureIdentifier with Product with Serializable
  131. case class MethodParameter(name: Option[String], accessFlags: Int) extends Product with Serializable

    The description of a method parameter.

    The description of a method parameter. If name is None a formal parameter is described.

  132. case class MethodParameterTable(parameters: MethodParameters) extends (Int) => MethodParameter with Attribute with Product with Serializable

    Representation of a method's information about the method parameters.

  133. type MethodParameters = ArraySeq[MethodParameter]
  134. final case class MethodSignature(name: String, descriptor: MethodDescriptor) extends Product with Serializable

    Represents a method signature which consists of the name and descriptor of a method; the signatures of all methods of a class file have to be different.

  135. final class MethodTemplate extends JVMMethod

    A method which is not (yet) associated with a class file.

  136. type MethodTemplates = ArraySeq[MethodTemplate]
  137. case class MethodTypeSignature(formalTypeParameters: List[FormalTypeParameter], parametersTypeSignatures: List[TypeSignature], returnTypeSignature: ReturnTypeSignature, throwsSignature: List[ThrowsSignature]) extends Signature with Product with Serializable

    See also

    For matching signatures see Signature.

  138. type Methods = ArraySeq[Method]
  139. case class Module(name: String, moduleFlags: Int, versionInfo: Option[String], requires: ArraySeq[Requires], exports: ArraySeq[Exports], opens: ArraySeq[Opens], uses: ArraySeq[ObjectType], provides: ArraySeq[Provides]) extends Attribute with Product with Serializable

    Definition of a Java 9 module.

  140. case class ModuleMainClass(mainClassType: ObjectType) extends Attribute with Product with Serializable

    Definition of a Java 9 module main class.

  141. case class ModulePackages(packages: Packages) extends Attribute with Product with Serializable

    Definition of a Java 9 module's packages.

  142. final class MultipleDefinedMethods extends DeclaredMethod
  143. case class NestHost(hostClassType: ObjectType) extends Attribute with Product with Serializable

    Definition of a Java 11 nest host.

  144. case class NestMembers(classes: Classes) extends Attribute with Product with Serializable

    Definition of Java 11 nest members.

  145. case class NewInvokeSpecialMethodHandle(receiverType: ObjectType, methodDescriptor: MethodDescriptor) extends MethodCallMethodHandle with Product with Serializable
  146. trait NoSourceElementsVisitor extends SourceElementsVisitor[Unit]

    Simple implementation of the SourceElementsVisitor trait where all methods do nothing.

  147. sealed abstract class NumericType extends BaseType
  148. final class ObjectType extends ReferenceType

    Represents an ObjectType.

  149. type ObjectTypes = ArraySeq[ObjectType]
  150. case class ObjectVariableInfo(clazz: ReferenceType) extends VerificationTypeInfo with Product with Serializable
  151. final type Opcode = Int
  152. case class Opens(opens: String, flags: Int, toPackages: ArraySeq[String]) extends Product with Serializable

    opens

    The name of the package.

  153. final type PC = Int

    A program counter identifies an instruction in a code array.

    A program counter identifies an instruction in a code array.

    A program counter is a value in the range [0/*UShort.min*/, 65535/*UShort.max*/].

    Note

    This type alias serves comprehension purposes.

  154. final class PCAndAnyRef[T <: AnyRef] extends AnyRef

    An efficient (i.e., no (un)boxing...) representation of an instruction and a value.

  155. final class PCAndInstruction extends AnyRef

    An efficient (i.e., no (un)boxing...) representation of an instruction and its pc.

  156. final class PCInMethod extends AnyRef

    An efficient (i.e., no (un)boxing...) representation of an instruction (identified) by its pc in a method.

  157. final type PCs = IntTrieSet

    A collection of program counters using an IntArraySet as its backing collection.

    A collection of program counters using an IntArraySet as its backing collection.

    Using PCs is in particular well suited for small(er) collections.

    Note

    This type alias serves comprehension purposes.

  158. type Packages = ArraySeq[String]
  159. trait ParameterAnnotationTable extends Attribute

    Parameter annotations.

  160. type ParameterAnnotations = ArraySeq[Annotations]
  161. case class PermittedSubclasses(classes: Classes) extends Attribute with Product with Serializable

    Definition of Java 17 permitted subclasses of a sealed class.

  162. case class ProperTypeArgument(varianceIndicator: Option[VarianceIndicator], fieldTypeSignature: FieldTypeSignature) extends TypeArgument with Product with Serializable

    See also

    For matching signatures see Signature.

  163. case class Provides(provides: ObjectType, withInterfaces: ArraySeq[ObjectType]) extends Product with Serializable
  164. case class PutFieldMethodHandle(declaringClassType: ObjectType, name: String, fieldType: FieldType) extends FieldWriteAccessMethodHandle with Product with Serializable
  165. case class PutStaticMethodHandle(declaringClassType: ObjectType, name: String, fieldType: FieldType) extends FieldWriteAccessMethodHandle with Product with Serializable
  166. case class Record(components: RecordComponents) extends Attribute with (Int) => RecordComponent with Product with Serializable

    Representation of a record class.

  167. case class RecordComponent(name: String, componentType: FieldType, attributes: Attributes) extends Product with Serializable

    The description of a record component (Java 16).

  168. type RecordComponents = ArraySeq[RecordComponent]
  169. sealed abstract class ReferenceType extends FieldType
  170. case class Requires(requires: String, flags: Int, version: Option[String]) extends Product with Serializable

    requires

    The name of a required module.

  171. trait ReturnTypeSignature extends SignatureElement
  172. case class RuntimeInvisibleAnnotationTable(annotations: Annotations) extends AnnotationTable with Product with Serializable

    The runtime invisible class, method, or field annotations.

  173. case class RuntimeInvisibleParameterAnnotationTable(parameterAnnotations: ParameterAnnotations) extends ParameterAnnotationTable with Product with Serializable

    Parameter annotations.

  174. case class RuntimeInvisibleTypeAnnotationTable(typeAnnotations: TypeAnnotations) extends TypeAnnotationTable with Product with Serializable

    The runtime invisible type annotations.

  175. case class RuntimeVisibleAnnotationTable(annotations: Annotations) extends AnnotationTable with Product with Serializable

    A class, method, or field annotation.

  176. case class RuntimeVisibleParameterAnnotationTable(parameterAnnotations: ParameterAnnotations) extends ParameterAnnotationTable with Product with Serializable

    Parameter annotations.

  177. case class RuntimeVisibleTypeAnnotationTable(typeAnnotations: TypeAnnotations) extends TypeAnnotationTable with Product with Serializable

    A runtime visible type annotation.

  178. final case class SameFrame(frameType: Int) extends StackMapFrame with Product with Serializable
  179. final case class SameFrameExtended(offsetDelta: Int) extends StackMapFrame with Product with Serializable
  180. final case class SameLocals1StackItemFrame(frameType: Int, verificationTypeInfoStackItem: br.VerificationTypeInfo) extends StackMapFrame with Product with Serializable
  181. final case class SameLocals1StackItemFrameExtended(offsetDelta: Int, verificationTypeInfoStackItem: br.VerificationTypeInfo) extends StackMapFrame with Product with Serializable
  182. sealed abstract class ShortType extends IntLikeType
  183. case class ShortValue(value: Short) extends BaseTypeElementValue with Product with Serializable
  184. sealed abstract class Signature extends SignatureElement with Attribute

    An attribute-level signature as defined in the JVM specification.

    An attribute-level signature as defined in the JVM specification.

    To match Signature objects the predefined matchers/extractors can be used. * @example

    Example 1

    interface Processor extends Function<Object, Void> { /*empty*/ }

    ClassSignature: Ljava/lang/Object;Ljava/util/function/Function<Ljava/lang/Object;Ljava/lang/Void;>;

    ClassSignature(
      typeParameters=List(),
      superClass=ClassTypeSignature(Some(java/lang/),SimpleClassTypeSignature(Object,List()),List()),
      superInterfaces=List(
          ClassTypeSignature(
              Some(java/util/function/),
              SimpleClassTypeSignature(Function,
                    List(ProperTypeArgument(
                           None,
                           ClassTypeSignature(
                              Some(java/lang/),
                              SimpleClassTypeSignature(Object,List()),
                              List())),
                       ProperTypeArgument(
                          None,
                          ClassTypeSignature(
                              Some(java/lang/),
                              SimpleClassTypeSignature(Void,List()),
                              List())))),
              List())))

    Example 2

    interface Col<C> { /*empty*/ }

    ClassSignature: <C:Ljava/lang/Object;>Ljava/lang/Object;

    ClassSignature(
        typeParameters=
            List(
                FormalTypeParameter(
                    C,
                    Some(ClassTypeSignature(
                            Some(java/lang/),SimpleClassTypeSignature(Object,List()),List())),
                    List())),
         superClass=ClassTypeSignature(
                Some(java/lang/),SimpleClassTypeSignature(Object,List()),List()),
         superInterfaces=List())

    Example 3

    interface ColObject extends Col<Object> { /*empty*/ }

    ClassSignature: Ljava/lang/Object;LCol<Ljava/lang/Object;>;

    ClassSignature(
        typeParameters=List(),
        superClass=ClassTypeSignature(Some(java/lang/),SimpleClassTypeSignature(Object,List()),List()),
        superInterfaces=List(
                ClassTypeSignature(
                    None,
                    SimpleClassTypeSignature(
                        Col,
                        List(ProperTypeArgument(
                                variance=None,
                                signature=ClassTypeSignature(Some(java/lang/),SimpleClassTypeSignature(Object,List()),List()))
                     )),
                     List())))

    Example 4

    interface ColError<E extends Error> extends Col<E>{/*empty*/}

    ClassSignature: <E:Ljava/lang/Error;>Ljava/lang/Object;LCol<TE;>;

    ClassSignature(
        typeParameters=List(
                FormalTypeParameter(
                    E,
                    Some(ClassTypeSignature(Some(java/lang/),SimpleClassTypeSignature(Error,List()),List())),List())),
        superClass=ClassTypeSignature(Some(java/lang/),SimpleClassTypeSignature(Object,List()),List()),
        superInterfaces=List(
                ClassTypeSignature(
                    None,
                    SimpleClassTypeSignature(
                        Col,
                        List(ProperTypeArgument(variance=None,signature=TypeVariableSignature(E)))),
                    List())))

    Example 5

    class Use {
      // The following fields all have "ClassTypeSignatures"
      Col<?> ce = null; // Signature: LCol<*>;
      Col<Object> co = null; // Signature: LCol<Ljava/lang/Object;>;
      Col<? super Serializable> cs = null; // Signature: LCol<-Ljava/io/Serializable;>;
      Col<? extends Comparable<?>> cc = null; // Signature: LCol<+Ljava/lang/Comparable<*>;>;
    
      MyCol<java.util.List<Object>> mco = new MyCol<>();
      MyCol<java.util.List<Object>>.MyInnerCol<Comparable<java.util.List<Object>>> mico = this.mco.new MyInnerCol<Comparable<java.util.List<Object>>>();
      // Signature: LMyCol<Ljava/util/List<Ljava/lang/Object;>;>.MyInnerCol<Ljava/lang/Comparable<Ljava/util/List<Ljava/lang/Object;>;>;>;
    }

    AST of mico:

    ClassSignature(
        typeParameters=List(),
        superClass=ClassTypeSignature(
                None,
                SimpleClassTypeSignature(
                    MyCol,
                    List(ProperTypeArgument(
                            variance=None,
                            signature=ClassTypeSignature(
                                    Some(java/util/),
                                    SimpleClassTypeSignature(
                                        List,
                                        List(ProperTypeArgument(
                                                variance=None,
                                                signature=ClassTypeSignature(
                                                        Some(java/lang/),
                                                        SimpleClassTypeSignature(Object,List()),
                                                        List())))),
                                     List())))),
                /*suffic=*/List(SimpleClassTypeSignature(
                        MyInnerCol,
                        List(ProperTypeArgument(
                                variance=None,
                                signature=ClassTypeSignature(
                                    Some(java/lang/),
                                    SimpleClassTypeSignature(
                                        Comparable,
                                        List(ProperTypeArgument(
                                                variance=None,
                                                signature=ClassTypeSignature(
                                                        Some(java/util/),
                                                        SimpleClassTypeSignature(
                                                            List,
                                                            List(ProperTypeArgument(
                                                                    variance=None,
                                                                    signature=ClassTypeSignature(
                                                                            Some(java/lang/),
                                                                            SimpleClassTypeSignature(Object,List()),
                                                                            List())))),
                                                        List())))),
                                    List())))))),
        superInterfaces=List())

    Matching Signatures

    Scala REPL:

    val SignatureParser = org.opalj.br.reader.SignatureParser
    val GenericType = org.opalj.br.GenericType
    val SimpleGenericType = org.opalj.br.SimpleGenericType
    val BasicClassTypeSignature = org.opalj.br.BasicClassTypeSignature
    
    SignatureParser.parseClassSignature("<E:Ljava/lang/Error;>Ljava/lang/Object;LCol<TE;>;").superInterfacesSignature.head match { case BasicClassTypeSignature(ot) => ot.toJava; case _ => null}
    // res: String = Col
    
    SignatureParser.parseClassSignature("<E:Ljava/lang/Error;>Ljava/lang/Object;LCol<TE;>;").superInterfacesSignature.head match { case SimpleGenericType(bt,gt) => bt.toJava+"<"+gt.toJava+">"; case _ => null}
    //res11: String = null
    
    scala> SignatureParser.parseFieldTypeSignature("LCol<Ljava/lang/Object;>;") match { case SimpleGenericType(bt,ta) => bt.toJava+"<"+ta+">"; case _ => null}
    res1: String = Col<ObjectType(java/lang/Object)>
    
    scala> SignatureParser.parseFieldTypeSignature("LCol<Ljava/lang/Object;>;") match { case GenericType(bt,ta) => bt.toJava+"<"+ta+">"; case _ => null}
    res2: String = Col<List(ProperTypeArgument(variance=None,signature=ClassTypeSignature(Some(java/lang/),SimpleClassTypeSignature(Object,List()),List())))>
  185. trait SignatureElement extends AnyRef

    An element of a Signature used to encode generic type information.

  186. trait SignatureVisitor[T] extends AnyRef

    Implements a visitor for type signatures.

  187. abstract class SimilarityTestConfiguration extends AnyRef

    Specifies which parts of a class file should be compared with another one.

  188. case class SimpleClassTypeSignature(simpleName: String, typeArguments: List[TypeArgument]) extends Product with Serializable

    See also

    For matching signatures see Signature.

  189. case class SourceDebugExtension(debug_extension: Array[Byte]) extends Attribute with Product with Serializable

    Attribute to associate additional debug information with a class.

    Attribute to associate additional debug information with a class. The source debug extension attribute is an optional attribute of a class declaration (org.opalj.br.ClassFile).

  190. trait SourceElement extends CommonSourceElementAttributes

    We treat as a source element every entity that can be referred to by other class files.

  191. final type SourceElementID = Int
  192. trait SourceElementsVisitor[T] extends AnyRef

    Classes that traverse a class file can extend this trait to facilitate reporting the traversed source file elements.

  193. case class SourceFile(sourceFile: String) extends Attribute with Product with Serializable

    The source file attribute is an optional attribute in the attributes table of org.opalj.br.ClassFile objects.

    The source file attribute is an optional attribute in the attributes table of org.opalj.br.ClassFile objects.

    sourceFile

    The name of the source file from which this class file was compiled; it will not contain any path information.

  194. sealed abstract class StackMapFrame extends AnyRef

    Part of the Java 6 stack map table attribute.

  195. type StackMapFrames = ArraySeq[StackMapFrame]
  196. case class StackMapTable(stackMapFrames: StackMapFrames) extends Attribute with Product with Serializable

    Java 6's stack map table attribute.

  197. case class StringValue(value: String) extends ElementValue with Product with Serializable
  198. trait StructureIdentifier extends AnyRef

    Uniquely identifies a specific element that can (by definition) only exist once in a project.

    Uniquely identifies a specific element that can (by definition) only exist once in a project. For example, in the context of OPAL a type declaration is unique or the combination of a type declaration and a field name or the combination of a type declaration, method name and method descriptor.

  199. sealed abstract class SubtypeInformation extends TypeHierarchyInformation

    Represents a type's subtype information.

  200. sealed abstract class SupertypeInformation extends TypeHierarchyInformation

    Represents a type's supertype information.

  201. case class SynthesizedClassFiles(classFiles: List[(ClassFile, Option[AnyRef])]) extends Attribute with Product with Serializable

    This attribute stores references to ClassFile objects that have been generated while parsing the annotated ClassFile.

    This attribute stores references to ClassFile objects that have been generated while parsing the annotated ClassFile.

    For example, to represent proxy types that have been created by Java8 lambda or method reference expressions.

    This attribute may only be present while the class file is processed/read and will be removed from the attributes table before any analysis sees the "final" class file.

    This attribute may occur multiple times in the attributes table of a class file structure.

    classFiles

    A sequence consisting of class file objects and "reasons" why the respective class file was created.

  202. case class TAOfCastExpression(offset: Int, type_argument_index: Int) extends TypeAnnotationTargetInCode with Product with Serializable
  203. case class TAOfCatch(exception_table_index: Int) extends TypeAnnotationTargetInCode with Product with Serializable
  204. case class TAOfConstructorInMethodReferenceExpression(offset: Int, type_argument_index: Int) extends TypeAnnotationTargetInCode with Product with Serializable
  205. case class TAOfConstructorInvocation(offset: Int, type_argument_index: Int) extends TypeAnnotationTargetInCode with Product with Serializable
  206. case class TAOfFormalParameter(formal_parameter_index: Int) extends TypeAnnotationTargetInMetodDeclaration with Product with Serializable
  207. case class TAOfInstanceOf(offset: Int) extends TypeAnnotationTargetInCode with Product with Serializable
  208. case class TAOfLocalvarDecl(localVarTable: ArraySeq[LocalvarTableEntry]) extends TypeAnnotationTargetInVarDecl with Product with Serializable
  209. case class TAOfMethodInMethodReferenceExpression(offset: Int, type_argument_index: Int) extends TypeAnnotationTargetInCode with Product with Serializable
  210. case class TAOfMethodInvocation(offset: Int, type_argument_index: Int) extends TypeAnnotationTargetInCode with Product with Serializable
  211. case class TAOfMethodReferenceExpressionIdentifier(offset: Int) extends TypeAnnotationTargetInCode with Product with Serializable
  212. case class TAOfMethodReferenceExpressionNew(offset: Int) extends TypeAnnotationTargetInCode with Product with Serializable
  213. case class TAOfNew(offset: Int) extends TypeAnnotationTargetInCode with Product with Serializable
  214. case class TAOfParameterDeclarationOfClassOrInterface(type_parameter_index: Int) extends TypeAnnotationTargetInClassDeclaration with Product with Serializable
  215. case class TAOfParameterDeclarationOfMethodOrConstructor(type_parameter_index: Int) extends TypeAnnotationTargetInMetodDeclaration with Product with Serializable
  216. case class TAOfResourcevarDecl(localVarTable: ArraySeq[LocalvarTableEntry]) extends TypeAnnotationTargetInVarDecl with Product with Serializable
  217. case class TAOfSupertype(supertype_index: Int) extends TypeAnnotationTargetInClassDeclaration with Product with Serializable
  218. case class TAOfThrows(throws_type_index: Int) extends TypeAnnotationTargetInMetodDeclaration with Product with Serializable
  219. case class TAOfTypeBoundOfParameterDeclarationOfClassOrInterface(type_parameter_index: Int, bound_index: Int) extends TypeAnnotationTargetInClassDeclaration with Product with Serializable
  220. case class TAOfTypeBoundOfParameterDeclarationOfMethodOrConstructor(type_parameter_index: Int, bound_index: Int) extends TypeAnnotationTargetInMetodDeclaration with Product with Serializable
  221. case class TAOnNestedType(path: ArraySeq[TypeAnnotationPathElement]) extends TypeAnnotationPath with Product with Serializable
  222. case class TAOnTypeArgument(index: Int) extends TypeAnnotationPathElement with Product with Serializable
  223. sealed trait ThrowsSignature extends SignatureElement
  224. trait TraversingVisitor extends SignatureVisitor[Unit]

    This visitor's visit methods completely traverse all elements of a type signature.

  225. sealed trait Type extends UIDValue with Ordered[Type]

    Represents a JVM type.

    Represents a JVM type.

    Programmatically, we distinguish three major kinds of types:

    • base types/primitive types,
    • reference types,
    • the type void.

    General Information

    From the JVM specification

    There are three kinds of reference types: class types, array types, and interface types. Their values are references to dynamically created class instances, arrays, or class instances or arrays that implement interfaces, respectively.

    A reference value may also be the special null reference, a reference to no object, which will be denoted here by null. The null reference initially has no runtime type, but may be cast to any type. The default value of a reference type is null. The Java virtual machine specification does not mandate a concrete value encoding null.

    Comparing Types/Performance

    Given that the comparison of types is a standard operation in static analysis that is usually done over and over again great care was taken to enable an efficient comparison of types. It is - without exception - always possible to compare types using reference equality (i.e., the eq/ne operators). For each type there will always be at most one object that represents that specific type.

    Additionally, a stable order is defined between types that is based on a type's kind and the unique id of the types in case of reference types. The order is: void type < primitive types < array types < class/interface types

  226. case class TypeAnnotation(target: TypeAnnotationTarget, path: TypeAnnotationPath, annotationType: FieldType, elementValuePairs: ElementValuePairs) extends AnnotationLike with Product with Serializable

    A type annotation (*TA*).

    A type annotation (*TA*).

    TypeAnnotations were introduced with Java 8 and are associated with a ClassFile, Field, Method or Code using a org.opalj.br.RuntimeInvisibleTypeAnnotationTable or a org.opalj.br.RuntimeVisibleTypeAnnotationTable attribute.

  227. sealed abstract class TypeAnnotationPath extends AnyRef

    The path that describes which type is actually annotated using a TypeAnnotation.

  228. sealed abstract class TypeAnnotationPathElement extends AnyRef

    An element of the path that describes which type is actually annotated using a TypeAnnotation.

  229. trait TypeAnnotationTable extends CodeAttribute

    The runtime (in)visible type annotations of a class, method, field or code block.

    The runtime (in)visible type annotations of a class, method, field or code block.

    Note

    For further information about type-level annotations go to: http://cr.openjdk.java.net/~abuckley/8misc.pdf.

  230. sealed abstract class TypeAnnotationTarget extends AnyRef

    Describes the kind of the target of a TypeAnnotation.

  231. sealed abstract class TypeAnnotationTargetInClassDeclaration extends TypeAnnotationTarget
  232. sealed abstract class TypeAnnotationTargetInCode extends TypeAnnotationTarget
  233. sealed abstract class TypeAnnotationTargetInFieldDeclaration extends TypeAnnotationTarget
  234. sealed abstract class TypeAnnotationTargetInMetodDeclaration extends TypeAnnotationTarget
  235. sealed abstract class TypeAnnotationTargetInVarDecl extends TypeAnnotationTargetInCode
  236. type TypeAnnotations = ArraySeq[TypeAnnotation]
  237. sealed abstract class TypeArgument extends SignatureElement

    See also

    For matching signatures see Signature.

  238. trait TypeConversionFactory[T] extends AnyRef

    A factory to create instruction sequences to convert one primitive type into another one.

  239. case class TypeDeclaration(objectType: ObjectType, isInterfaceType: Boolean, theSuperclassType: Option[ObjectType], theSuperinterfaceTypes: UIDSet[ObjectType]) extends Product with Serializable

    Stores information about a type's supertypes.

  240. sealed abstract class TypeHierarchyInformation extends AnyRef

    Represents the results of a type hierarchy related query.

  241. case class TypeIdentifier(t: Type) extends StructureIdentifier with Product with Serializable
  242. trait TypeSignature extends ReturnTypeSignature
  243. case class TypeVariableSignature(identifier: String) extends Signature with FieldTypeSignature with ThrowsSignature with Product with Serializable

    See also

    For matching signatures see Signature.

  244. class TypesVisitor extends TraversingVisitor

    Traverses a signature and calls for each Type the given method.

    Traverses a signature and calls for each Type the given method.

    Thread Safety

    This class is thread-safe and reusable. I.e., you can use one instance of this visitor to simultaneously process multiple signatures. In this case, however, the given function f also has to be thread safe or you have to use different functions.

  245. case class UninitializedVariableInfo(offset: Int) extends VerificationTypeInfo with Product with Serializable
  246. case class UnknownAttribute(attributeName: String, info: Array[Byte]) extends Attribute with Product with Serializable

    Represents (as a byte array) attributes that are not directly supported by OPAL.

  247. case class UnpackedLineNumberTable(lineNumbers: LineNumbers) extends LineNumberTable with Product with Serializable

    A method's line number table.

  248. type UpperTypeBound = UIDSet[ReferenceType]

    An upper type bound represents the available type information about a reference value.

    An upper type bound represents the available type information about a reference value. It is always "just" an upper bound for a concrete type; i.e., we know that the runtime type has to be a subtype (reflexive) of the type identified by the upper bound. Furthermore, an upper bound can identify multiple independent types. E.g., a type bound for array objects could be: java.io.Serializable and java.lang.Cloneable. Here, independent means that no two types of the bound are in a subtype relationship. Hence, an upper bound is always a special set where the values are not equal and are not in an inheritance relation. However, identifying independent types is a class hierarchy's responsibility.

    In general, an upper bound identifies a single class type and a set of independent interface types that are known to be implemented by the current object. Even if the type contains a class type it may just be a super class of the concrete type and, hence, just represent an abstraction.

  249. sealed abstract class VarianceIndicator extends SignatureElement

    Indicates a TypeArgument's variance.

  250. sealed abstract class VerificationTypeInfo extends AnyRef

    Part of the Java 6 stack map table attribute.

  251. type VerificationTypeInfoLocals = ArraySeq[VerificationTypeInfo]
  252. type VerificationTypeInfoStack = ArraySeq[VerificationTypeInfo]
  253. final case class VirtualClass(thisType: ObjectType) extends VirtualSourceElement with Product with Serializable

    Represents a class for which we have found some references but have not analyzed any class file or do not want to keep the reference to the underlying class file.

  254. sealed abstract class VirtualClassMember extends VirtualSourceElement

  255. final class VirtualDeclaredMethod extends DeclaredMethod

    Represents a method belonging to the API of the specified class type, where the original method definition is not available (in the context of the current analysis).

    Represents a method belonging to the API of the specified class type, where the original method definition is not available (in the context of the current analysis). Note that one VirtualDeclaredMethod may represent more than one actual method, because a class may have several package-private methods with the same signature.

  256. final case class VirtualField(declaringClassType: ObjectType, name: String, fieldType: FieldType) extends VirtualClassMember with Product with Serializable

    Represents a field of a virtual class.

  257. final case class VirtualForwardingMethod(declaringClassType: ReferenceType, name: String, descriptor: MethodDescriptor, target: Method) extends VirtualMethod with Product with Serializable
  258. sealed class VirtualMethod extends VirtualClassMember

    Represents a method of a virtual class.

  259. sealed abstract class VirtualSourceElement extends SourceElement with Ordered[VirtualSourceElement]

    A VirtualSourceElement is the representation of some source element that may be detached from the concrete source element that represents the implementation; that is, the virtual source element may not have a reference to the concrete element.

  260. sealed abstract class VoidType extends Type with ReturnTypeSignature

    Represents the Java type/keyword void.

  261. sealed abstract class Wildcard extends TypeArgument

    If a type argument is not further specified (e.g., List<?> l = …), then the type argument "?" is represented by this object.

    If a type argument is not further specified (e.g., List<?> l = …), then the type argument "?" is represented by this object.

    See also

    For matching signatures see Signature.

Value Members

  1. val Attributes: ArraySeq.type
  2. val BaseConfig: Config
  3. final val ConfigKeyPrefix: String("org.opalj.br.")
  4. val ElementValuePairs: ArraySeq.type
  5. val FieldTypes: ArraySeq.type
  6. final val FrameworkName: String("OPAL Bytecode Representation")
  7. val Methods: ArraySeq.type
  8. def NoAnnotations: ArraySeq[Annotation]
  9. final def NoAttributes: Attributes
  10. final def NoElementValuePairs: ElementValuePairs
  11. final def NoExceptionHandlers: ExceptionHandlers
  12. final def NoFieldTemplates: FieldTemplates
  13. final def NoFieldTypes: FieldTypes
  14. final def NoFields: Fields
  15. final def NoInterfaces: Interfaces
  16. final def NoMethodTemplates: MethodTemplates
  17. final def NoMethods: Methods
  18. final val NoPCs: IntTrieSet
  19. final def NoParameterAnnotations: ParameterAnnotations
  20. final def NoTypeAnnotations: ArraySeq[TypeAnnotation]
  21. val ObjectTypes: ArraySeq.type
  22. def annotationsToJava(annotations: Annotations, before: String = "", after: String = ""): String

    Converts a given list of annotations into a Java-like representation.

  23. def classAccessFlagsToString(accessFlags: Int): String
  24. def classAccessFlagsToXHTML(accessFlags: Int): Node
  25. def methodAccessFlagsToString(accessFlags: Int): String
  26. def methodToXHTML(accessFlags: Int, name: String, descriptor: MethodDescriptor, abbreviateTypes: Boolean): Node
  27. def methodToXHTML(name: String, descriptor: MethodDescriptor, abbreviateTypes: Boolean = true): Node

    Creates an (X)HTML5 representation that resembles Java source code method signature.

  28. final def newFieldTypesBuilder(): Builder[FieldType, ArraySeq[FieldType]]
  29. def registerIndexToParameterIndex(isStatic: Boolean, descriptor: MethodDescriptor, registerIndex: Int): Int

    Calculates the parameter index associated with a method's local variable register index.

    Calculates the parameter index associated with a method's local variable register index. The index of the first parameter is 0. If the method is not static the *this* reference stored in register index 0 has the parameter index -1.

    isStatic

    true if method is static and, hence, has no implicit parameter for this.

    returns

    The parameter index for the specified register.

  30. def typeToXHTML(accessFlags: Int, t: Type, abbreviateTypes: Boolean): Node
  31. def typeToXHTML(t: Type, abbreviateType: Boolean = true): Node

    Creates an (X)HTML5 representation of the given Java type declaration.

  32. object Annotation extends Serializable

    Factory object to create Annotation objects.

  33. object AnnotationTable

    Functionality common to annotation tables.

  34. object AnnotationValue extends Serializable
  35. object ArrayElementType

    Facilitates matching against an array's element type.

  36. object ArrayType

    Defines factory and extractor methods for ArrayTypes.

  37. object ArrayTypeSignature extends Serializable
  38. object ArrayValue extends Serializable
  39. object BaseType

    Common constants related to base types (aka.

    Common constants related to base types (aka. primitive types).

  40. object BasicClassTypeSignature

    Extractor/Matcher of the (potentially erased) ObjectType that is defined by a ClassTypeSignature; ignores all further potential type parameters.

    Extractor/Matcher of the (potentially erased) ObjectType that is defined by a ClassTypeSignature; ignores all further potential type parameters.

    See also

    For matching signatures see Signature.

  41. case object BooleanType extends BooleanType with Product with Serializable
  42. object BooleanValue extends Serializable
  43. object BootstrapMethodTable extends Serializable
  44. case object ByteType extends ByteType with Product with Serializable
  45. object ByteValue extends Serializable
  46. case object CTIntType extends CTIntType with Product with Serializable

    In some cases we abstract over all computational type integer values.

  47. case object Category1ComputationalTypeCategory extends ComputationalTypeCategory with Product with Serializable
  48. case object Category2ComputationalTypeCategory extends ComputationalTypeCategory with Product with Serializable
  49. case object CharType extends CharType with Product with Serializable
  50. object CharValue extends Serializable
  51. object ChopFrame
  52. object ClassFile

    Defines factory and extractor methods for ClassFile objects as well as related constants.

  53. object ClassHierarchy

    Factory methods for creating ClassHierarchy objects.

  54. object ClassMember

    Defines an extractor method for class members.

  55. object ClassSignature extends Serializable
  56. object ClassTypeSignature extends Serializable
  57. object ClassValue extends Serializable
  58. object Code

    Defines constants useful when analyzing a method's code.

  59. object CompareAllConfiguration extends CompareAllConfiguration
  60. case object ComputationalTypeDouble extends ComputationalType with Product with Serializable
  61. case object ComputationalTypeFloat extends ComputationalType with Product with Serializable
  62. case object ComputationalTypeInt extends ComputationalType with Product with Serializable
  63. case object ComputationalTypeLong extends ComputationalType with Product with Serializable
  64. case object ComputationalTypeReference extends ComputationalType with Product with Serializable
  65. case object ComputationalTypeReturnAddress extends ComputationalType with Product with Serializable
  66. object ConcreteType

    Matches a ClassTypeSignature with a SimpleClassTypeSignature that does not define a generic type.

    Matches a ClassTypeSignature with a SimpleClassTypeSignature that does not define a generic type. For example, java.lang.Object.

    See also

    For matching signatures see Signature.

  67. object ConcreteTypeArgument

    Facilitates matching ProperTypeArguments that define a single concrete/invariant type that is not a generic type on its own.

    Facilitates matching ProperTypeArguments that define a single concrete/invariant type that is not a generic type on its own. E.g., it can be used to match the type argument of List<Integer> and to extract the concrete type Integer. It cannot be used to match, e.g., List<List<Integer>>.

    See also

    For matching signatures see Signature.

  68. object ConstantDouble extends Serializable
  69. object ConstantFloat extends Serializable
  70. object ConstantInteger extends Serializable
  71. object ConstantLong extends Serializable
  72. object ConstantString extends Serializable
  73. object ConstantValue

    Facilitates matching constant values.

  74. case object ContravariantIndicator extends ContravariantIndicator with Product with Serializable
  75. case object CovariantIndicator extends CovariantIndicator with Product with Serializable
  76. case object Deprecated extends Attribute with Product with Serializable

    The deprecated attribute.

  77. case object DoubleType extends DoubleType with Product with Serializable
  78. object DoubleValue extends Serializable
  79. case object DoubleVariableInfo extends VerificationTypeInfo with Product with Serializable
  80. object DynamicConstant
  81. object ElementReferenceType
  82. object ElementValue
  83. object ElementValuePair extends Serializable
  84. object EnclosingMethod extends Serializable
  85. object EnumValue extends Serializable
  86. object ExceptionTable extends Serializable
  87. object Field

    Defines factory and extractor methods for Field objects.

  88. object FieldType

    Factory to parse field type (descriptors) to get field type objects.

  89. object FieldTypeJVMSignature
  90. object FieldTypeSignature
  91. case object FloatType extends FloatType with Product with Serializable
  92. object FloatValue extends Serializable
  93. case object FloatVariableInfo extends VerificationTypeInfo with Product with Serializable
  94. object GenericType

    Matches all ClassTypeSignatures which consists of a SimpleClassTypeSignature with a non-empty List of TypeArguments ( which consists of Wildcards or ProperTypeArguments)

    Matches all ClassTypeSignatures which consists of a SimpleClassTypeSignature with a non-empty List of TypeArguments ( which consists of Wildcards or ProperTypeArguments)

    See also

    For matching signatures see Signature.

  95. object GenericTypeArgument

    Facilitates matching the (VarianceIndicator, ObjectType) that is defined within a ProperTypeArgument.

    Facilitates matching the (VarianceIndicator, ObjectType) that is defined within a ProperTypeArgument. It matches ProperTypeArguments which define TypeArguments in the inner ClassTypeSignature.

    Example:
    1. matches e.g.: List<List<Integer>>

      val scts : SimpleClassTypeSignature = ...
      scts.typeArguments match {
          case GenericTypeArgument(varInd, objectType) => ...
          case _ => ...
      }
    See also

    For matching signatures see Signature.

  96. object GenericTypeWithClassSuffix

    Matches all ClassTypeSignatures which consists of a SimpleClassTypeSignature with an optional list of TypeArguments ( which consists of Wildcards or ProperTypeArguments) and a non-empty list of SimpleClassTypeSignature (which encodes the suffix of the ClassTypeSignature for inner classes)

    Matches all ClassTypeSignatures which consists of a SimpleClassTypeSignature with an optional list of TypeArguments ( which consists of Wildcards or ProperTypeArguments) and a non-empty list of SimpleClassTypeSignature (which encodes the suffix of the ClassTypeSignature for inner classes)

    See also

    For matching signatures see Signature.

  97. object HasNoArgsAndReturnsVoid
  98. object InnerClassTable extends Serializable
  99. object IntValue extends Serializable
  100. case object IntegerType extends IntegerType with Product with Serializable
  101. case object IntegerVariableInfo extends VerificationTypeInfo with Product with Serializable
  102. object JVMMethodDescriptor

    Extractor for JVM method descriptors (for example, "(I[Ljava/lang/Object;])V").

  103. object LineNumberTable
  104. object LocalVariableTable extends Serializable
  105. object LocalVariableTypeTable extends Serializable
  106. case object LongType extends LongType with Product with Serializable
  107. object LongValue extends Serializable
  108. case object LongVariableInfo extends VerificationTypeInfo with Product with Serializable
  109. object LowerTypeBound

    Facilitates matching ProperTypeArguments that define a lower type bound.

    Facilitates matching ProperTypeArguments that define a lower type bound. E.g., a type bound which uses a ContravarianceIndicator (? super) such as in List<? super Number>.

    Example:
    1. matches, e.g., List<? super Integer>

      val scts : SimpleClassTypeSignature = ...
      scts.typeArguments.head match {
          case LowerTypeBound(objectType) => ...
          case _ => ...
      }
    See also

    For matching signatures see Signature.

  110. object Method

    Defines factory and extractor methods for Method objects.

  111. object MethodCallMethodHandle
  112. object MethodDescriptor

    Defines extractor and factory methods for MethodDescriptors.

  113. object MethodParameterTable extends Serializable
  114. object MethodTypeSignature extends Serializable
  115. object MethodWithBody

    Provides efficient pattern matching facilities for methods with bodies.

    Provides efficient pattern matching facilities for methods with bodies.

    Example:
    1. Matching all methods that have a method body:

      for {
           classFile <- project.classFiles
           method @ MethodWithBody(code) <- classFile.methods
      } {
           // the type of method is "..resolved.Method"
           // the type of code is "..resolved.Code"
      }
  116. object Module extends Serializable
  117. object ModuleMainClass extends Serializable
  118. object ModulePackages extends Serializable
  119. object NestHost extends Serializable
  120. object NestMembers extends Serializable
  121. object NoArgumentMethodDescriptor
  122. object NotJavaLangObject

    Defines an extractor to match a type against any ObjectType except java.lang.Object.

    Defines an extractor to match a type against any ObjectType except java.lang.Object.

    Example:
    1. val t : Type = ...
      t match {
       case ot @ NotJavaLangObject() => ot
       case _ =>
      }
  123. object NotVoid

    Defines an extractor to match against any Type except void.

    Defines an extractor to match against any Type except void. Can be useful, e.g., when matching MethodDescriptors to select all methods that return something.

  124. case object NullVariableInfo extends VerificationTypeInfo with Product with Serializable
  125. object ObjectType

    Defines factory and extractor methods for ObjectTypes.

  126. object PCAndAnyRef
  127. object PCAndInstruction
  128. object PCInMethod
  129. object ParameterAnnotationTable
  130. object PermittedSubclasses extends Serializable
  131. object Record extends Serializable
  132. object ReferenceType

    Factory to create instances of ReferenceType.

  133. object ReturnType
  134. object RuntimeInvisibleAnnotationTable extends Serializable
  135. object RuntimeInvisibleParameterAnnotationTable extends Serializable
  136. object RuntimeInvisibleTypeAnnotationTable extends Serializable
  137. object RuntimeVisibleAnnotationTable extends Serializable
  138. object RuntimeVisibleParameterAnnotationTable extends Serializable
  139. object RuntimeVisibleTypeAnnotationTable extends Serializable
  140. case object ShortType extends ShortType with Product with Serializable
  141. object ShortValue extends Serializable
  142. object Signature
  143. object SimpleGenericType

    Facilitates matching ClassTypeSignatures that define a simple generic type that has a single type argument with a concrete type.

    Facilitates matching ClassTypeSignatures that define a simple generic type that has a single type argument with a concrete type.

    Example:
    1. The following can be used to match, e.g., List<Object>.

      val f : Field = ...
      f.fieldTypeSignature match {
          case SimpleGenericType(ContainerType,ElementType) => ...
          case _ => ...
      }
  144. object SingleArgumentMethodDescriptor

    Extractor for method descriptors defining a single parameter type and some return type.

  145. object SourceDebugExtension extends Serializable
  146. object SourceFile extends Serializable
  147. object StackMapTable extends Serializable
  148. object StringValue extends Serializable
  149. object SubtypeInformation

    Factory to create the subtype information data structure.

  150. object SupertypeInformation
  151. object SynthesizedClassFiles extends Serializable
  152. case object Synthetic extends Attribute with Product with Serializable

    The synthetic attribute.

  153. case object TADeeperInArrayType extends TypeAnnotationPathElement with Product with Serializable
  154. case object TADeeperInNestedType extends TypeAnnotationPathElement with Product with Serializable
  155. case object TADirectlyOnType extends TypeAnnotationPath with Product with Serializable
  156. case object TAOfFieldDeclaration extends TypeAnnotationTargetInFieldDeclaration with Product with Serializable
  157. case object TAOfReceiverType extends TypeAnnotationTargetInMetodDeclaration with Product with Serializable
  158. case object TAOfReturnType extends TypeAnnotationTargetInMetodDeclaration with Product with Serializable
  159. case object TAOnBoundOfWildcardType extends TypeAnnotationPathElement with Product with Serializable
  160. object TAOnTypeArgument extends Serializable
  161. object TheArgument

    Extractor for method descriptors defining a single parameter type.

  162. case object TopVariableInfo extends VerificationTypeInfo with Product with Serializable
  163. object TwoArgumentsMethodDescriptor
  164. object Type
  165. object TypeAnnotationTable

    Functionality common to annotation tables.

  166. object TypeVariableSignature extends Serializable
  167. case object UninitializedThisVariableInfo extends VerificationTypeInfo with Product with Serializable
  168. object UnknownAttribute extends Serializable
  169. object UpperTypeBound

    Facilitates matching ProperTypeArguments that define an upper type bound.

    Facilitates matching ProperTypeArguments that define an upper type bound. E.g., a type bound which uses a CovarianceIndicator (? extends) such as in List<? extends Number>.

    Example:
    1. val scts : SimpleClassTypeSignature = ...
      scts.typeArguments.head match {
          case UpperTypeBound(objectType) => ...
          case _ => ...
      }
    See also

    For matching signatures see Signature.

  170. object VirtualMethod
  171. object VirtualSourceElement

    Defines common helper functions related to VirtualSourceElements.

  172. case object VirtualTypeFlag extends Attribute with Product with Serializable

    This class file level attribute identifies ClassFile objects that have no direct representation in the bytecode of a project.

    This class file level attribute identifies ClassFile objects that have no direct representation in the bytecode of a project.

    Instead, the class file annotated with this attribute was generated to represent a class file object that is either explicitly generated at runtime and then used by the program or is conceptually generated at runtime by the JavaVM, but not exposed to the program. An example of the later case are the call site objects that are generated for invokedynamic instructions.

    However, such classes are generally required to facilitate subsequent analyses.

  173. case object VoidType extends VoidType with Product with Serializable
  174. case object Wildcard extends Wildcard with Product with Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped