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 {
caseSome(IsInheritableByNewTypes) => ...
caseSome(NotInheritableByNewTypes) => ...
caseNone=> ... // this happens only if a not supported entity is passed to the computation.
}
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:
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.
This analysis implements a direct property computation that is only executed when required.