Determines for each method if it belongs to the public interface, hence, can be inherited by a future - yet unknown - subtype. Since
this property is defined w.r.t. future subtyping it is only relevant when libraries are analyzed.
It specifies in particular whether a method can be inherited by a subtype that is created by some client of the library.
When a method cannot be inherited by a future subtype is discussed in the following:
Inheritance w.r.t. Applications
If an application is analyzed, this analysis does not make any sense since all used types are already known. Therefore,
all applications methods should have the property NotInheritableByNewTypes.
Inheritance w.r.t. Open Packages Assumption
inheritance is possible if:
$ - if the method's visibility modifier is either public, protected or package visible
$ - if the method's declaring class is not (effectively) final
$ - CPA has to be applied to classes which are in the package "java.*"
Inheritance w.r.t. Closed Packages Assumption
Inheritance is possible if:
$ - if the method's visibility modifier is public or protected
$ - if the method's declaring class not is (effectively) final
$ - if the method's declaring class is package visible and does not have a public subtype
within the same package that inherits the method where the method is not overridden on
the path from the declaring type to the public subtype
Special Cases
Notice that the packages "java.*" are closed, hence, nobody can contribute to this packages. Therefore, only
public or protected methods where the declaring class is either public or the declaring class has a public subtype that does
not override the method can have the property IsInheritableByNewTypes. Therefore, the closed packages assumption can always
be applied to these packages.
Fallback
The sound fallback of this property depends on the actual analysis mode under which the property is computed.
If the analysis mode is some application analysis mode (Desktop, J2EE etc.), the entity NotInheritableByNewTypes.
If the analysis mode is some library analysis mode (CPA, OPA), the sound approximation is IsInheritableByNewTypes.
Cycle Resolution Strategy
None.
Linear Supertypes
Property, PropertyMetaInformation, PropertyKind, AnyRef, Any
Determines for each method if it belongs to the public interface, hence, can be inherited by a future - yet unknown - subtype. Since this property is defined w.r.t. future subtyping it is only relevant when libraries are analyzed.
It specifies in particular whether a method can be inherited by a subtype that is created by some client of the library. When a method cannot be inherited by a future subtype is discussed in the following:
Inheritance w.r.t. Applications
If an application is analyzed, this analysis does not make any sense since all used types are already known. Therefore, all applications methods should have the property NotInheritableByNewTypes.
Inheritance w.r.t. Open Packages Assumption
inheritance is possible if: $ - if the method's visibility modifier is either public, protected or package visible $ - if the method's declaring class is not (effectively) final $ - CPA has to be applied to classes which are in the package "java.*"
Inheritance w.r.t. Closed Packages Assumption
Inheritance is possible if: $ - if the method's visibility modifier is public or protected $ - if the method's declaring class not is (effectively) final $ - if the method's declaring class is package visible and does not have a public subtype within the same package that inherits the method where the method is not overridden on the path from the declaring type to the public subtype
Special Cases
Notice that the packages "java.*" are closed, hence, nobody can contribute to this packages. Therefore, only public or protected methods where the declaring class is either public or the declaring class has a public subtype that does not override the method can have the property IsInheritableByNewTypes. Therefore, the closed packages assumption can always be applied to these packages.
Fallback
The sound fallback of this property depends on the actual analysis mode under which the property is computed.
If the analysis mode is some application analysis mode (Desktop, J2EE etc.), the entity NotInheritableByNewTypes. If the analysis mode is some library analysis mode (CPA, OPA), the sound approximation is IsInheritableByNewTypes.
Cycle Resolution Strategy
None.