Class/Object

org.opalj.fpcf.analysis

InheritableByNewSubtypesAnalysis

Related Docs: object InheritableByNewSubtypesAnalysis | package analysis

Permalink

class InheritableByNewSubtypesAnalysis extends FPCFAnalysis

This analysis computes the InheritableByNewTypes property.* I.e., it determines whether a method can directly be inherited by a future subtype. This is in particular important when analyzing libraries.

The analysis assumes that packages that start with "java." are closed, i.e., that no client can put a class into these specific packages.

Usage

Use the FPCFAnalysesManagerKey to query the analysis manager of a project. You can run the analysis afterwards as follows:

val analysisManager = project.get(FPCFAnalysisManagerKey)
analysisManager.run(InheritableByNewSubtypesAnalysis)

For detailed information see the documentation of the analysis manager.

The results of this analysis are stored in the property store of the project. You can receive the results as follows:

val thePropertyStore = theProject.get(SourceElementsPropertyStoreKey)
val property = thePropertyStore(method, InheritableByNewTypes.Key)
property match {
  case Some(IsInheritableByNewTypes) => ...
  case Some(NotInheritableByNewTypes) => ...
  case None => ... // this happens only if a not supported entity is passed to the computation.
}

Implementation

This analysis computes the org.opalj.fpcf.properties.InheritableByNewTypes property. Since this makes only sense when libraries are analyzed, using the application mode will result in the org.opalj.fpcf.properties.NotInheritableByNewTypes for every given entity.

This analysis considers all scenarios that are documented by the org.opalj.fpcf.properties.InheritableByNewTypes property.

Note

This analysis implements a direct property computation that is only executed when required.

Linear Supertypes
FPCFAnalysis, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InheritableByNewSubtypesAnalysis
  2. FPCFAnalysis
  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. implicit final val classHierarchy: ClassHierarchy

    Permalink
    Definition Classes
    FPCFAnalysis
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  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 isClosedLibrary: Boolean

    Permalink
    Definition Classes
    FPCFAnalysis
  13. final def isDesktopApplication: Boolean

    Permalink
    Definition Classes
    FPCFAnalysis
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def isJEEApplication: Boolean

    Permalink
    Definition Classes
    FPCFAnalysis
  16. final def isOpenLibrary: Boolean

    Permalink
    Definition Classes
    FPCFAnalysis
  17. implicit final val logContext: LogContext

    Permalink
    Definition Classes
    FPCFAnalysis
  18. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  21. val project: SomeProject

    Permalink
  22. implicit final val propertyStore: PropertyStore

    Permalink
    Definition Classes
    FPCFAnalysis
  23. final def ps: PropertyStore

    Permalink
    Definition Classes
    FPCFAnalysis
  24. def subtypeInheritability(isApplicationMode: Boolean)(e: Entity): Property

    Permalink

    Determines whether a method can be inherited by a library client.

    Determines whether a method can be inherited by a library client. This should not be called if the current analysis mode is application-related.

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

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

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

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

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

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

Inherited from FPCFAnalysis

Inherited from AnyRef

Inherited from Any

Ungrouped