Packages

t

org.opalj.br.reader

LibraryClassFileBinding

trait LibraryClassFileBinding extends ClassFileBinding

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

Self Type
LibraryClassFileBinding with ConstantPoolBinding with MethodsBinding with FieldsBinding with AttributeBinding
Source
LibraryClassFileBinding.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LibraryClassFileBinding
  2. ClassFileBinding
  3. ClassFileReader
  4. Constant_PoolAbstractions
  5. ClassFileReaderConfiguration
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. abstract type Attributes

    The type of the object that represents a class declaration's attributes (e.g., the source file attribute.)

    The type of the object that represents a class declaration's attributes (e.g., the source file attribute.)

    Definition Classes
    ClassFileReader
  2. abstract type CONSTANT_Utf8_info <: (LibraryClassFileBinding.this)#Constant_Pool_Entry
    Definition Classes
    Constant_PoolAbstractions
  3. type ClassFile = br.ClassFile

    The type of the object that represents a Java class file.

    The type of the object that represents a Java class file.

    Definition Classes
    ClassFileBindingClassFileReaderConstant_PoolAbstractions
  4. final type Constant_Pool = Array[(LibraryClassFileBinding.this)#Constant_Pool_Entry]
    Definition Classes
    Constant_PoolAbstractions
  5. abstract type Constant_Pool_Entry <: ConstantPoolEntry
    Definition Classes
    Constant_PoolAbstractions
  6. final type Constant_Pool_Index = Int
    Definition Classes
    Constant_PoolAbstractions
  7. type DeferredActionsStore = Buffer[((LibraryClassFileBinding.this)#ClassFile) => (LibraryClassFileBinding.this)#ClassFile] with (LibraryClassFileBinding.this)#Constant_Pool_Entry

    A DeferredActionsStore stores all functions that need to perform post load actions.

    A DeferredActionsStore stores all functions that need to perform post load actions.

    One example is the resolution of references to attributes. (The constant pool is the only structure that is passed around and hence it is the only place where to store information/functions related to a specific class file).

    Definition Classes
    Constant_PoolAbstractions
  8. abstract type Fields

    The type of the object that represents the fields of a class.

    The type of the object that represents the fields of a class.

    Definition Classes
    ClassFileReader
  9. final type Interfaces = Array[(LibraryClassFileBinding.this)#Constant_Pool_Index]

    The inherited interfaces.

    The inherited interfaces.

    Definition Classes
    ClassFileReader
  10. abstract type Methods

    The type of the object that represents all methods of a class.

    The type of the object that represents all methods of a class.

    Definition Classes
    ClassFileReader

Abstract Value Members

  1. abstract def Attributes(cp: (LibraryClassFileBinding.this)#Constant_Pool, ap: AttributeParent, ap_name_index: (LibraryClassFileBinding.this)#Constant_Pool_Index, ap_descriptor_index: (LibraryClassFileBinding.this)#Constant_Pool_Index, in: DataInputStream): (LibraryClassFileBinding.this)#Attributes

    Reads all attributes using the given stream and constant pool.

    Reads all attributes using the given stream and constant pool.

    The given stream is positioned directly before a class file's "attributes_count" field. This method is called by the template method that reads in a class file to delegate the reading of the attributes.

    From the Specification

    The attributes [...] appearing in the attributes table of a ClassFile structure are the InnerClasses, EnclosingMethod, Synthetic, Signature, SourceFile, SourceDebugExtension, Deprecated, RuntimeVisibleAnnotations, RuntimeInvisibleAnnotations, BootstrapMethods, RuntimeVisibleTypeAnnotations, and RuntimeInvisibleTypeAnnotations attributes.

    Attributes
    protected
    Definition Classes
    ClassFileReader
  2. abstract def Constant_Pool(in: DataInputStream): (LibraryClassFileBinding.this)#Constant_Pool

    Reads the constant pool using the given stream.

    Reads the constant pool using the given stream.

    When this method is called the given stream has to be positioned at the very beginning of the constant pool. This method is called by the template method that reads in a class file to delegate the reading of the constant pool. Only information belonging to the constant pool are allowed to be read.

    The stream must not be closed after reading the constant pool.

    Attributes
    protected
    Definition Classes
    ClassFileReader
  3. abstract def Fields(cp: (LibraryClassFileBinding.this)#Constant_Pool, in: DataInputStream): (LibraryClassFileBinding.this)#Fields

    Reads all field declarations using the given stream and constant pool.

    Reads all field declarations using the given stream and constant pool.

    The given stream is positioned directly before a class file's "fields_count" field. This method is called by the template method that reads in a class file to delegate the reading of the declared fields.

    Attributes
    protected
    Definition Classes
    ClassFileReader
  4. abstract def Methods(cp: (LibraryClassFileBinding.this)#Constant_Pool, in: DataInputStream): (LibraryClassFileBinding.this)#Methods

    Reads all method declarations using the given stream and constant pool.

    Reads all method declarations using the given stream and constant pool.

    The given stream is positioned directly before a class file's "methods_count" field. This method is called by the template method that reads in a class file to delegate the reading of the declared method.

    Attributes
    protected
    Definition Classes
    ClassFileReader
  5. abstract def applyDeferredActions(cp: (LibraryClassFileBinding.this)#Constant_Pool, classFile: (LibraryClassFileBinding.this)#ClassFile): (LibraryClassFileBinding.this)#ClassFile

    This method is called/needs to be called after the class file was completely loaded to perform class file specific transformations.

    This method is called/needs to be called after the class file was completely loaded to perform class file specific transformations.

    Definition Classes
    Constant_PoolAbstractions
  6. implicit abstract val constantPoolEntryType: ClassTag[(LibraryClassFileBinding.this)#Constant_Pool_Entry]
    Definition Classes
    Constant_PoolAbstractions
  7. abstract def loadsInterfacesOnly: Boolean

    If true method bodies are never loaded.

    If true method bodies are never loaded.

    Definition Classes
    ClassFileReaderConfiguration

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def AllClassFiles(files: Iterable[File], exceptionHandler: bi.reader.ClassFileReader.ExceptionHandler = defaultExceptionHandler): Iterable[((LibraryClassFileBinding.this)#ClassFile, URL)]
    Definition Classes
    ClassFileReader
  5. def ClassFile(cp: (LibraryClassFileBinding.this)#Constant_Pool, minor_version: Int, major_version: Int, access_flags: Int, this_class_index: (LibraryClassFileBinding.this)#Constant_Pool_Index, super_class_index: (LibraryClassFileBinding.this)#Constant_Pool_Index, interfaces: (LibraryClassFileBinding.this)#Interfaces, fields: (LibraryClassFileBinding.this)#Fields, methods: (LibraryClassFileBinding.this)#Methods, attributes: (LibraryClassFileBinding.this)#Attributes): (LibraryClassFileBinding.this)#ClassFile

    Factory method to create the ClassFile object that represents the class file as a whole, plus any ClassFiles that have been synthesized in the process of parsing it.

    Factory method to create the ClassFile object that represents the class file as a whole, plus any ClassFiles that have been synthesized in the process of parsing it.

    The result will always contain at least one ClassFile object, namely the one that is created from this method's parameters. Regardless of how many ClassFiles the result contains, the ClassFile created from this method's parameters will always be the result's first element.

    Definition Classes
    LibraryClassFileBindingClassFileBindingClassFileReader
  6. def ClassFile(jarFileName: String, jarFileEntryName: String): List[(LibraryClassFileBinding.this)#ClassFile]

    Reads in a single class file from a Jar file.

    Reads in a single class file from a Jar file.

    jarFileName

    the name of an existing ZIP/JAR file that contains class files.

    jarFileEntryName

    the name of a class file stored in the specified ZIP/JAR file.

    Definition Classes
    ClassFileReader
    Annotations
    @throws("if the file is empty or the entry cannot be found")
  7. def ClassFile(jarFile: File, jarFileEntryName: String): List[(LibraryClassFileBinding.this)#ClassFile]

    Reads in a single class file from a Jar file.

    Reads in a single class file from a Jar file.

    jarFile

    An existing ZIP/JAR file that contains class files.

    jarFileEntryName

    The name of a class file stored in the specified ZIP/JAR file.

    Definition Classes
    ClassFileReader
    Annotations
    @throws("if the file is empty or the entry cannot be found")
  8. def ClassFile(jarFile: ZipFile, jarEntry: ZipEntry): List[(LibraryClassFileBinding.this)#ClassFile]
    Attributes
    protected[this]
    Definition Classes
    ClassFileReader
  9. def ClassFile(create: () => InputStream): List[(LibraryClassFileBinding.this)#ClassFile]

    Reads in a class file.

    Reads in a class file.

    create

    A function that creates a new InputStream and which must not return null. If you already do have an open input stream which should not be closed after reading the class file use ...ClassFileReader.ClassFile(java.io.DataInputStream) : ClassFile instead. The (newly created) InputStream returned by calling create is closed by this method. The created input stream will automatically be wrapped by OPAL to enable efficient reading of the class file.

    Definition Classes
    ClassFileReader
  10. def ClassFile(in: DataInputStream): List[(LibraryClassFileBinding.this)#ClassFile]

    Template method that reads a Java class file from the given input stream.

    Template method that reads a Java class file from the given input stream.

    All other methods to read a class file use this method to eventually parse a class file.

    Class File Structure

    Parses a class file according to the specification:

    ClassFile {
       u4 magic;
       u2 minor_version;
       u2 major_version;
       u2 constant_pool_count;
       cp_info constant_pool[constant_pool_count-1];
       u2 access_flags;
       u2 this_class;
       u2 super_class;
       u2 interfaces_count;
       u2 interfaces[interfaces_count];
       u2 fields_count;
       field_info fields[fields_count];
       u2 methods_count;
       method_info methods[methods_count];
       u2 attributes_count;
       attribute_info attributes[attributes_count];
    }
    

    in

    The DataInputStream from which the class file will be read. The stream is not closed by this method. It is highly recommended that the stream is buffered; otherwise the performance will be terrible!

    Definition Classes
    ClassFileReader
  11. def ClassFiles(file: File, exceptionHandler: bi.reader.ClassFileReader.ExceptionHandler = defaultExceptionHandler): List[((LibraryClassFileBinding.this)#ClassFile, URL)]

    Loads class files from the given file location.

    Loads class files from the given file location.

    • If the file denotes a single ".class" file this class file is loaded.
    • If the file object denotes a ".jar|.war|.ear|.zip" file, all class files in the jar file will be loaded.
    • If the file object specifies a directory object, all ".class" files in the directory and in all subdirectories are loaded as well as all class files stored in ".jar" files in one of the directories. This class loads all class files in parallel. However, this does not effect analyses working on the resulting List.
    Definition Classes
    ClassFileReader
  12. def ClassFiles(zipFile: ZipFile, classFileHandler: ((LibraryClassFileBinding.this)#ClassFile, URL) => Unit, exceptionHandler: bi.reader.ClassFileReader.ExceptionHandler): Unit

    Reads in parallel all class files stored in the given jar file.

    Reads in parallel all class files stored in the given jar file. For each successfully read class file the function classFileHandler is called.

    zipFile

    A valid zip file that contains .class files and other .jar files; other files are ignored. Inner jar files are also unzipped.

    classFileHandler

    A function that is called for each class file in the given jar file. Given that the jarFile is read in parallel this function has to be thread safe.

    exceptionHandler

    The exception handler that is called when the reading of a class file fails. This function has to be thread safe.

    Definition Classes
    ClassFileReader
  13. def ClassFiles(in: => JarInputStream): List[((LibraryClassFileBinding.this)#ClassFile, String)]

    Reads the class files from the given JarInputStream

    Reads the class files from the given JarInputStream

    Definition Classes
    ClassFileReader
  14. def ClassFiles(jarFile: ZipFile, exceptionHandler: bi.reader.ClassFileReader.ExceptionHandler): List[((LibraryClassFileBinding.this)#ClassFile, URL)]

    Reads in parallel all class files stored in the given jar/zip file.

    Reads in parallel all class files stored in the given jar/zip file.

    jarFile

    Some valid (non-empty) jar File.

    returns

    The loaded class files.

    Definition Classes
    ClassFileReader
  15. def JRTClassFiles: Iterable[(String, List[((LibraryClassFileBinding.this)#ClassFile, URL)])]

    Returns the class files of the current Java Runtime Image grouped by module.

    Returns the class files of the current Java Runtime Image grouped by module.

    Definition Classes
    ClassFileReader
  16. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  17. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  18. implicit val config: Config

    The Config object that will be used to read the configuration settings for reading in class files.

    The Config object that will be used to read the configuration settings for reading in class files.

    Definition Classes
    ClassFileReaderConfiguration
  19. def defaultConfig: Config
  20. final val defaultExceptionHandler: bi.reader.ClassFileReader.ExceptionHandler
    Definition Classes
    ClassFileReader
  21. def defaultLogContext: LogContext
  22. val deleteSynthesizedClassFilesAttributes: Boolean

    This property determines whether artificial SynthesizedClassFiles attributes are kept or removed.

    This property determines whether artificial SynthesizedClassFiles attributes are kept or removed.

    Definition Classes
    ClassFileBinding
    Note

    This setting can be set using the configuration key ClassFileBinding.DeleteSynthesizedClassFilesAttributesConfigKey.

  23. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  25. val extractSynthesizedClassFiles: (List[(LibraryClassFileBinding.this)#ClassFile]) => List[(LibraryClassFileBinding.this)#ClassFile]

    Tests if the class file has a SynthesizedClassFiles attribute and – if so – extracts the class file and removes the attribute.

    Tests if the class file has a SynthesizedClassFiles attribute and – if so – extracts the class file and removes the attribute.

    Definition Classes
    ClassFileBinding
  26. def findClassFile(files: Iterable[File], progressReporter: (File) => Unit, classFileFilter: ((LibraryClassFileBinding.this)#ClassFile) => Boolean, className: ((LibraryClassFileBinding.this)#ClassFile) => String, exceptionHandler: bi.reader.ClassFileReader.ExceptionHandler = defaultExceptionHandler): Either[((LibraryClassFileBinding.this)#ClassFile, URL), Set[String]]

    Searches for the first class file that is accepted by the filter.

    Searches for the first class file that is accepted by the filter. If no class file can be found that is accepted by the filter the set of all class names is returned.

    files

    Some file. If the file names a .jar file the .jar file is opened and searched for a corresponding class file. If the file identifies a "directory" then, all files in that directory are processed.

    Definition Classes
    ClassFileReader
  27. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  28. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  29. def isClassFileRepository(filename: String, containerName: Option[String]): Boolean
    Definition Classes
    ClassFileReader
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. implicit val logContext: LogContext

    The org.opalj.log.LogContext that should be used to log rewritings.

    The org.opalj.log.LogContext that should be used to log rewritings.

    Definition Classes
    ClassFileReaderConfiguration
    Note

    The org.opalj.log.LogContext is typically either the org.opalj.log.GlobalLogContext or a project specific log context.

  32. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  34. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  35. def processClassFiles(files: Iterable[File], progressReporter: (File) => Unit, classFileProcessor: (((LibraryClassFileBinding.this)#ClassFile, URL)) => Unit, exceptionHandler: bi.reader.ClassFileReader.ExceptionHandler = defaultExceptionHandler): Unit

    Goes over all files in parallel and calls back the given function which has to be thread-safe!

    Goes over all files in parallel and calls back the given function which has to be thread-safe!

    Definition Classes
    ClassFileReader
  36. def registerClassFilePostProcessor(p: (List[(LibraryClassFileBinding.this)#ClassFile]) => List[(LibraryClassFileBinding.this)#ClassFile]): Unit

    Register a class file post processor.

    Register a class file post processor. A class file post processor can transform the completely read and reified class file. Post processors can only be registered before the usage of a class file reader. Registering new ClassFilePostProcessors while processing class files is not supported and the behavior is undefined.

    Definition Classes
    ClassFileReader
    Note

    PostProcessors will be executed in last-in-first-out order.

  37. val removeBootstrapMethodAttribute: (List[(LibraryClassFileBinding.this)#ClassFile]) => List[(LibraryClassFileBinding.this)#ClassFile]

    Removes all BootstrapMethodTable attributes because the invokedynamic instructions are either completely resolved by creating code that resembles the code executed by the JVM or the instructions are at least enhanced and have explicit references to the bootstrap methods.

    Removes all BootstrapMethodTable attributes because the invokedynamic instructions are either completely resolved by creating code that resembles the code executed by the JVM or the instructions are at least enhanced and have explicit references to the bootstrap methods.

    Definition Classes
    ClassFileBinding
  38. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  39. def toString(): String
    Definition Classes
    AnyRef → Any
  40. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  41. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from ClassFileBinding

Inherited from ClassFileReader

Inherited from AnyRef

Inherited from Any

Ungrouped