Class

org.opalj.de

DependencyExtractor

Related Doc: package de

Permalink

class DependencyExtractor extends AnyRef

Traverses a org.opalj.br.SourceElement and identifies all dependencies between the element (org.opalj.br.ClassFile, org.opalj.br.Field or org.opalj.br.Method declaration) and any element it depends on. The kind of the dependencies that are extracted are defined by the DependencyType enumeration.

Concurrency

The DependencyExtractor does not perform any kind of parallelization on its own. Users of a DependencyExtractor are expected to perform the parallelization (e.g., on the level of source elements) if desired.

Thread Safety

The DependencyExtractor does not define any relevant state and, hence, this class is thread-safe.

However, if multiple dependency extractors are executed concurrently and share the same DependencyProcessor or the same DepencencyExtractor is used by multiple threads concurrently, the DependencyProcessor has to be thread-safe.

Note

If the DependencyExtractor is extended it is important to delegate all creations of VirtualSourceElements to the DependencyProcessor to make sure that the dependency processor can perform, e.g., some internalization.

,

By default, self dependencies will be reported (e.g. a method that calls itself, a class that defines a field with the same type). If necessary or undesired, self dependencies can easily be filtered by a DependencyProcessor's processDependency method.

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

Instance Constructors

  1. new DependencyExtractor(dependencyProcessor: DependencyProcessor)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val dependencyProcessor: DependencyProcessor

    Permalink
    Attributes
    protected[this]
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. def process(declaringClass: VirtualClass, method: Method): Unit

    Permalink

    Extracts all dependencies related to the given method.

    Extracts all dependencies related to the given method.

    declaringClass

    The method's declaring class.

    method

    The method whose dependencies should be extracted.

    Attributes
    protected
  17. def process(declaringClass: VirtualClass, field: Field): Unit

    Permalink

    Extracts all dependencies related to the given field.

    Extracts all dependencies related to the given field.

    declaringClass

    This field's declaring class.

    field

    The field whose dependencies will be extracted.

    Attributes
    protected
  18. def process(classFile: ClassFile): Unit

    Permalink

    Extracts all inter source element dependencies of the given class file (including all fields, methods, annotations,...

    Extracts all inter source element dependencies of the given class file (including all fields, methods, annotations,... declared by it). I.e. it extracts all source code dependencies that start from the given class file, its fields or methods, respectively.

    For each extracted dependency the respective dependencyProcessor is called.

    classFile

    The class file whose dependencies should be extracted.

  19. def processDependency(source: VirtualSourceElement, target: Type, dType: DependencyType): Unit

    Permalink
    Attributes
    protected[this]
  20. def processDependency(source: VirtualSourceElement, target: ArrayType, dType: DependencyType): Unit

    Permalink
    Attributes
    protected[this]
    Annotations
    @inline()
  21. def processDependency(source: VirtualSourceElement, target: BaseType, dType: DependencyType): Unit

    Permalink
    Attributes
    protected[this]
    Annotations
    @inline()
  22. def processDependency(source: VirtualSourceElement, target: ObjectType, dType: DependencyType): Unit

    Permalink
    Attributes
    protected[this]
    Annotations
    @inline()
  23. def processDependency(source: ClassFile, target: ObjectType, dType: DependencyType): Unit

    Permalink
    Attributes
    protected[this]
    Annotations
    @inline()
  24. def processDependency(source: ClassFile, target: VirtualSourceElement, dType: DependencyType): Unit

    Permalink
    Attributes
    protected[this]
  25. def processDependency(source: ObjectType, target: VirtualSourceElement, dType: DependencyType): Unit

    Permalink
    Attributes
    protected[this]
  26. def processInvokedynamic(declaringMethod: VirtualMethod, instruction: INVOKEDYNAMIC): Unit

    Permalink

    Prints a warning that the handling of org.opalj.br.instructions.INVOKEDYNAMIC instructions is incomplete (from the point of view of the dependencies to the "real" methods) and then calls processInvokedynamicRuntimeDependencies to handle the instruction.

    Prints a warning that the handling of org.opalj.br.instructions.INVOKEDYNAMIC instructions is incomplete (from the point of view of the dependencies to the "real" methods) and then calls processInvokedynamicRuntimeDependencies to handle the instruction.

    The warning is only shown once.

    Overriding

    This method should be overridden by subclasses that resolve dependencies related to an Invokedynamic instruction. However, in that case the method processInvokedynamicRuntimeDependencies should be called explicitly.

    Attributes
    protected[this]
  27. def processInvokedynamicRuntimeDependencies(declaringMethod: VirtualMethod, instruction: INVOKEDYNAMIC): Unit

    Permalink

    Default implementation for handling Invokedynamic instructions that only extracts dependencies on the runtime infrastructure (e.g.

    Default implementation for handling Invokedynamic instructions that only extracts dependencies on the runtime infrastructure (e.g. the bootstrap method and its surrounding class, the types of its arguments and its return type).

    To gain more information about invokedynamic instructions, a special subclass of DependencyExtractor must be created which overrides this method and performs deeper-going analysis on invokedynamic instructions.

    Attributes
    protected[this]
  28. def processSignature(declaringElement: VirtualSourceElement, signature: SignatureElement, isInTypeParameters: Boolean = false): Unit

    Permalink

    Processes the given signature.

    Processes the given signature.

    Processing a signature means extracting all references to types that are used in the type parameters that occur in the signature.

    declaringElement

    The signature's element.

    signature

    The signature whose type parameters should be analyzed.

    isInTypeParameters

    true if the current signature (part) is already a part of a type parameter.

    Attributes
    protected
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  31. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped