Object

org.opalj.ai.analyses.cg

EntryPointKey

Related Doc: package cg

Permalink

object EntryPointKey extends ProjectInformationKey[EntryPointInformation, Nothing]

The key object to get the entry point(s) of a project. The entry points are computed w.r.t. to the analysis mode of the project.

Source
EntryPointKey.scala
Examples:
  1. To get the entry point information use the Project's get use:

    val EntryPointInformation = project.get(EntryPointKey)
  2. ,
  3. The example defines at least two methods as entry points:

    • all methods in "com.test.Main" with the name "main", i.e. if more than one method named "main" exists all are added.
    • the method in "com.test.Main" with the name "increase" that requires an integer parameter and also return an integer. If a method descriptor is given, duplicates can't exist.
    org.opalj.callgraph.entryPoints = [
        { declaringClass = "com/test/Main", name = "main" },
        { declaringClass = "com/test/Main", name = "increase", descriptor = "(I)I" }
    ]
Note

The entry point analysis is not sufficient when it comes – for example – to non-traceable callbacks; i.e., calls that are implicitly triggered by the JVM, a custom framework, a custom web server or others. To overcome that limitation, the key provides a mechanism to specify individual entry points via the configuration file. To use that mechanism, it's required to add the following config key to the configuration file. The general format of the JSON key that can be added to the application.conf or reference.conf.

org.opalj.callgraph.entryPoints = [
    {   declaringClass = "",
        methodName = "name",
        descriptor = "" } # OPTIONAL
]

As the previous definition suggests, each entry point definition consists of the declaringClass and name. The optional third parameter is the method descriptor.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EntryPointKey
  2. ProjectInformationKey
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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. def compute(project: SomeProject): EntryPointInformation

    Permalink

    Computes the information for the given project.

    Computes the information for the given project.

    Attributes
    protected
    Definition Classes
    EntryPointKeyProjectInformationKey
    Note

    Classes that inherit from this trait are not expected to make this method public. This method is only expected to be called by an instance of a Project.

  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 getConfigEntryPoints(project: SomeProject): Set[Method]

    Permalink
  12. def hashCode(): Int

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  17. def requirements: Seq[ProjectInformationKey[_ >: InstantiableClasses with PropertyStore with FPCFAnalysesManager <: AnyRef, _ <: ConcurrentLinkedQueue[(Project[_]) ⇒ (Traversable[AnyRef], scala.reflect.api.JavaUniverse.Type, AnyRef)]]]

    Permalink

    Returns the information which other project information need to be available before this analysis can be performed.

    Returns the information which other project information need to be available before this analysis can be performed.

    If the analysis has no special requirements Nil can be returned.

    Attributes
    protected
    Definition Classes
    EntryPointKeyProjectInformationKey
    Note

    Classes/Objects that implement this trait should not make the method public to avoid that this method is called accidentally by regular user code.

    ,

    All requirements must be listed; failing to specify a requirement can result in a deadlock.

  18. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  20. final val uniqueId: Int

    Permalink

    The unique id of this key.

    The unique id of this key. The key is used to enable efficient access and is automatically assigned by OPAL and will not change after that.

    Definition Classes
    ProjectInformationKey
  21. final def wait(): Unit

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

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

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

Inherited from ProjectInformationKey[EntryPointInformation, Nothing]

Inherited from AnyRef

Inherited from Any

Ungrouped