Package

org.opalj.br

reader

Permalink

package reader

Defines convenience methods related to reading in class files.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. reader
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait AnnotationAttributesBinding extends AnnotationsBinding with AnnotationsReader with ParametersAnnotationsReader with RuntimeInvisibleAnnotations_attributeReader with RuntimeVisibleAnnotations_attributeReader with RuntimeInvisibleParameterAnnotations_attributeReader with RuntimeVisibleParameterAnnotations_attributeReader with AnnotationDefault_attributeReader with AttributeBinding

    Permalink

    Factory methods to create representations of the attributes related to Java annotations.

  2. trait AnnotationsBinding extends AnnotationAbstractions with ElementValuePairsReader with ConstantPoolBinding

    Permalink

    Factory methods to create representations of Java annotations.

  3. trait AttributeBinding extends AttributesAbstractions

    Permalink

    Defines the common bindings for all "resolved" attributes.

  4. trait BootstrapMethods_attributeBinding extends BootstrapMethods_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

    Final bindings and factory methods for the BoostrapMethods attribute.

  5. class BytecodeInstructionsCache extends AnyRef

    Permalink
  6. trait BytecodeReaderAndBinding extends DeferredInvokedynamicResolution

    Permalink

    Defines a method to parse an array of bytes (containing Java bytecode instructions) and to return an array of org.opalj.br.instructions.Instruction's.

    Defines a method to parse an array of bytes (containing Java bytecode instructions) and to return an array of org.opalj.br.instructions.Instruction's.

    The target array has the same size as the source array to make sure that branch offsets etc. point to the correct instruction.

  7. trait CachedBytecodeReaderAndBinding extends DeferredInvokedynamicResolution

    Permalink

    Defines a method to parse an array of bytes (containing Java bytecode instructions) and to return an array of org.opalj.br.instructions.Instructions.

    Defines a method to parse an array of bytes (containing Java bytecode instructions) and to return an array of org.opalj.br.instructions.Instructions.

    The target array has the same size as the source array to make sure that branch offsets etc. point to the correct instruction.

    This reader caches the instructions – primarily – to save memory once all class files are loaded.

  8. trait ClassFileBinding extends ClassFileReader

    Permalink

  9. trait CodeAttributeBinding extends Code_attributeReader with ConstantPoolBinding with CodeBinding with AttributeBinding

    Permalink

    Binding for the code attribute.

  10. trait CodeBinding extends AnyRef

    Permalink

  11. trait CompactLineNumberTable_attributeBinding extends CompactLineNumberTable_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

    Implements the factory methods to create line number tables.

  12. trait ConstantPoolBinding extends Constant_PoolReader

    Permalink

    A representation of the constant pool.

    A representation of the constant pool.

    Note

    The constant pool is considered to be static; i.e., references between constant pool entries are always resolved at most once and the results are cached. Hence, after reading the constant pool the constant pool is treated as immutable; the referenced constant pool entry must not change.

  13. trait ConstantValue_attributeBinding extends ConstantValue_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

  14. trait DeferredInvokedynamicResolution extends ConstantPoolBinding with CodeBinding

    Permalink

    Mixin this trait to resolve links between org.opalj.br.instructions.INVOKEDYNAMIC instructions and the BootstrapMethodTable.

  15. trait Deprecated_attributeBinding extends Deprecated_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

  16. trait EnclosingMethod_attributeBinding extends EnclosingMethod_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

  17. trait Exceptions_attributeBinding extends Exceptions_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

    The factory method to create a method's exception attribute.

  18. trait FieldsBinding extends FieldsReader

    Permalink

  19. trait InnerClasses_attributeBinding extends InnerClasses_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

    The factory methods to create inner classes attributes and entries.

  20. trait Java7Framework extends Java7LibraryFramework with CodeAttributeBinding with SourceDebugExtension_attributeBinding with BootstrapMethods_attributeBinding with StackMapTable_attributeBinding with CompactLineNumberTable_attributeBinding with LocalVariableTable_attributeBinding with LocalVariableTypeTable_attributeBinding with Exceptions_attributeBinding with BytecodeReaderAndBinding with CodeReader

    Permalink

    This "framework" can be used to read in Java 7 (version 51) class files.

    This "framework" can be used to read in Java 7 (version 51) class files. All standard information (as defined in the Java Virtual Machine Specification) is represented.

  21. trait Java7LibraryFramework extends ConstantPoolBinding with FieldsBinding with MethodsBinding with ClassFileBinding with AttributesReader with SkipUnknown_attributeReader with AnnotationAttributesBinding with InnerClasses_attributeBinding with EnclosingMethod_attributeBinding with SourceFile_attributeBinding with Deprecated_attributeBinding with Signature_attributeBinding with Synthetic_attributeBinding with ConstantValue_attributeBinding

    Permalink

    This "framework" can be used to read in Java 7 (version 51) class files if only the public interface of a class is needed.

  22. trait Java8Framework extends Java7Framework with Java8LibraryFramework

    Permalink

    This "framework" can be used to read Java 8 (version 52) class files.

    This "framework" can be used to read Java 8 (version 52) class files. All standard information (as defined in the Java Virtual Machine Specification) is represented.

  23. class Java8FrameworkWithCaching extends Java8LibraryFramework with CodeAttributeBinding with SourceDebugExtension_attributeBinding with BootstrapMethods_attributeBinding with StackMapTable_attributeBinding with CompactLineNumberTable_attributeBinding with LocalVariableTable_attributeBinding with LocalVariableTypeTable_attributeBinding with Exceptions_attributeBinding with CachedBytecodeReaderAndBinding with CodeReader

    Permalink

    This configuration can be used to read in Java 8 (version 52) class files.

    This configuration can be used to read in Java 8 (version 52) class files. All standard information (as defined in the Java Virtual Machine Specification) is represented. Instructions will be cached.

  24. class Java8FrameworkWithLambdaExpressionsSupportAndCaching extends Java8FrameworkWithCaching with Java8LambdaExpressionsRewriting

    Permalink

    This configuration can be used to read in Java 8 (version 52) class files with full support for rewriting invokedynamic instructions created by the JDK(8) compiler for lambda and method reference expressions.

    This configuration can be used to read in Java 8 (version 52) class files with full support for rewriting invokedynamic instructions created by the JDK(8) compiler for lambda and method reference expressions. All standard information (as defined in the Java Virtual Machine Specification) is represented. Instructions will be cached.

  25. trait Java8LambdaExpressionsRewriting extends DeferredInvokedynamicResolution

    Permalink

    Provides support for rewriting Java 8 lambda or method reference expressions that werwe compiled to org.opalj.br.instructions.INVOKEDYNAMIC instructions.

    Provides support for rewriting Java 8 lambda or method reference expressions that werwe compiled to org.opalj.br.instructions.INVOKEDYNAMIC instructions. This trait should be mixed in alongside a BytecodeReaderAndBinding, which extracts basic invokedynamic information from the BootstrapMethodTable.

    Specifically, whenever an invokedynamic instruction is encountered that is the result of a lambda/method reference expression compiled by Oracle's JDK8, it creates a proxy class file that represents the synthetic object that the JVM generates after executing the invokedynamic call site. This proxy is then stored in the temporary ClassFile attribute SynthesizedClassFiles. All such ClassFiles will be picked up later for inclusion in the project.

  26. trait Java8LibraryFramework extends Java7LibraryFramework with MethodParameters_attributeBinding with TypeAnnotationAttributesBinding

    Permalink

    This "framework" can be used to read in Java 8 (version 52) class files.

    This "framework" can be used to read in Java 8 (version 52) class files. All standard information (as defined in the Java Virtual Machine Specification) is represented except of method implementations.

  27. trait Java9Framework extends Java8Framework with Java9LibraryFramework

    Permalink

    This "framework" can be used to read Java 9 (version 53) class files.

    This "framework" can be used to read Java 9 (version 53) class files. All standard information (as defined in the Java Virtual Machine Specification) is represented.

  28. class Java9FrameworkWithLambdaExpressionsSupportAndCaching extends Java8FrameworkWithLambdaExpressionsSupportAndCaching

    Permalink

    This configuration can be used to read in Java 9 (version 53) class files.

    This configuration can be used to read in Java 9 (version 53) class files. All standard information (as defined in the Java Virtual Machine Specification) is represented. Instructions will be cached.

  29. trait Java9LibraryFramework extends Java8LibraryFramework with Module_attributeBinding

    Permalink

    This "framework" can be used to read in Java 9 (version 53) class files.

    This "framework" can be used to read in Java 9 (version 53) class files. All standard information (as defined in the Java Virtual Machine Specification) is represented except of method implementations.

  30. trait LibraryClassFileBinding extends ClassFileBinding

    Permalink

    Default class file binding where all private fields and methods are not represented.

  31. trait LocalVariableTable_attributeBinding extends LocalVariableTable_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

    The factory methods to create local variable tables and their entries.

  32. trait LocalVariableTypeTable_attributeBinding extends LocalVariableTypeTable_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

    The factory methods to create local variable type tables and their entries.

  33. trait MethodParameters_attributeBinding extends MethodParameters_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

    Implements the factory methods to create method parameter tables and their entries.

  34. trait MethodsBinding extends MethodsReader

    Permalink

  35. trait Module_attributeBinding extends Module_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

    The factory method to create the class level Module attribute (Java 9).

  36. trait Signature_attributeBinding extends Signature_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

    Implements the factory method defined and used by the generic signature attribute reader.

  37. type Source = AnyRef

    Permalink
  38. trait SourceDebugExtension_attributeBinding extends SourceDebugExtension_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

    Provides the factory method to create a source debug extension attribute.

  39. trait SourceFile_attributeBinding extends SourceFile_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

    The factory method to create the source file attribute.

  40. trait StackMapTable_attributeBinding extends StackMapTable_attributeReader with StackMapFrameReader with VerificationTypeInfoReader with ConstantPoolBinding with AttributeBinding

    Permalink

    Provides the factory methods to create a stack map table attribute and its entries.

  41. trait Synthetic_attributeBinding extends Synthetic_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

    Represents Java's Synthetic attribute.

  42. trait TypeAnnotationAttributesBinding extends TypeAnnotationsBinding with RuntimeInvisibleTypeAnnotations_attributeReader with RuntimeVisibleTypeAnnotations_attributeReader with AttributeBinding

    Permalink

    Factory methods to create representations of the attributes related to Java type annotations.

  43. trait TypeAnnotationsBinding extends TypeAnnotationsReader with TypeAnnotationTargetReader with TypeAnnotationPathReader with AnnotationsBinding with AttributeBinding

    Permalink

    Factory methods to create representations of Java type annotations.

  44. trait Unknown_attributeBinding extends Unknown_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

    "Factory" to create unknown attributes which are used to represent class file attributes that are not understood by this framework.

  45. trait UnpackedLineNumberTable_attributeBinding extends LineNumberTable_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

    Implements the factory methods to create line number tables and their entries.

Value Members

  1. object ClassFileBinding

    Permalink
  2. object ClassFileReaderConfiguration

    Permalink

  3. final val ConfigKeyPrefix: String

    Permalink
  4. object Java7Framework extends Java7Framework

    Permalink
  5. object Java7LibraryFramework extends Java7LibraryFramework

    Permalink
  6. object Java8Framework extends Java8Framework

    Permalink
  7. object Java8LambdaExpressionsRewriting

    Permalink
  8. object Java8LibraryFramework extends Java8LibraryFramework

    Permalink
  9. object Java9Framework extends Java9Framework

    Permalink
  10. object Java9LibraryFramework extends Java9LibraryFramework

    Permalink
  11. object SignatureParser

    Permalink

    Parses Java class file signature strings.

    Parses Java class file signature strings.

    Thread-Safety

    Using this object is thread-safe.

  12. def read(args: Iterable[String], classFilesReader: (File, (Source, Throwable) ⇒ Unit) ⇒ Iterable[(ClassFile, URL)]): (Iterable[(ClassFile, URL)], List[Throwable])

    Permalink

    Reads in all class files found in the jar files or jar and class files in the folders specified by args.

    Reads in all class files found in the jar files or jar and class files in the folders specified by args. The class files are read in using the specified class file reader. This enables, e.g., to use this method to only read in the public interface of a class file or to read in complete class files.

    args

    An Iterable of file and folder names that refer to jar files or folders in which jar and class files are found.

    classFilesReader

    A function that – given a file (jar, folder, class file) –  loads the respective class files and returns an Iterable. The second parameter of the function is a function that should be called back by the reader whenever the processing of given file fails with an exception. This design was chosen to enable a reader of jar file to continue processing class files even if the processing of a class file failed.

  13. def readClassFiles(files: Iterable[File], classFilesReader: (File, (Source, Throwable) ⇒ Unit) ⇒ Iterable[(ClassFile, URL)], perFile: (File) ⇒ Unit = (f: File) ⇒ { /*do nothing*/ }): (Iterable[(ClassFile, URL)], List[Throwable])

    Permalink
  14. def readJREClassFiles(cache: BytecodeInstructionsCache = new BytecodeInstructionsCache)(implicit reader: ClassFileBinding = ..., logContext: LogContext = GlobalLogContext): Seq[(ClassFile, URL)]

    Permalink

    Loads class files from JRE .jars found in the boot classpath.

    Loads class files from JRE .jars found in the boot classpath.

    returns

    List of class files ready to be passed to a IndexBasedProject.

  15. def readRTJarClassFiles(cache: BytecodeInstructionsCache = new BytecodeInstructionsCache)(implicit reader: ClassFileBinding = ..., logContext: LogContext = GlobalLogContext): Traversable[(ClassFile, URL)]

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped