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 ParameterAnnotationsReader 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 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 Java8LibraryFrameworkWithCaching 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 "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. Instructions will be cached.

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

  25. class Java8LibraryFrameworkWithCaching 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 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 bodies.

  26. trait LibraryClassFileBinding extends ClassFileBinding

    Permalink

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

  27. trait LocalVariableTable_attributeBinding extends LocalVariableTable_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

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

  28. trait LocalVariableTypeTable_attributeBinding extends LocalVariableTypeTable_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

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

  29. trait MethodParameters_attributeBinding extends MethodParameters_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

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

  30. trait MethodsBinding extends MethodsReader

    Permalink

  31. trait Signature_attributeBinding extends Signature_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

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

  32. type Source = AnyRef

    Permalink
  33. trait SourceDebugExtension_attributeBinding extends SourceDebugExtension_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

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

  34. trait SourceFile_attributeBinding extends SourceFile_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

    The factory method to create the source file attribute.

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

  36. case class SynthesizedClassFiles(classFiles: Seq[ClassFile]) extends Attribute with Product with Serializable

    Permalink

    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 JDK8 lambda or method reference expressions.

  37. trait Synthetic_attributeBinding extends Synthetic_attributeReader with ConstantPoolBinding with AttributeBinding

    Permalink

    Represents Java's Synthetic attribute.

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

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

    Permalink

    Factory methods to create representations of Java type annotations.

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

  41. 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 Java7Framework extends Java7Framework

    Permalink
  2. object Java7LibraryFramework extends Java7LibraryFramework

    Permalink
  3. object Java8Framework extends Java8Framework

    Permalink
  4. object Java8LibraryFramework extends Java8LibraryFramework

    Permalink
  5. object SignatureParser

    Permalink

    Parses Java class file signature strings.

    Parses Java class file signature strings.

    Thread-Safety

    Using this object is thread-safe.

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped