Trait/Object

org.opalj.fpcf.properties

InheritableByNewTypes

Related Docs: object InheritableByNewTypes | package properties

Permalink

sealed trait InheritableByNewTypes extends Property

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
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InheritableByNewTypes
  2. Property
  3. PropertyMetaInformation
  4. PropertyKind
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final type Self = InheritableByNewTypes

    Permalink
    Definition Classes
    InheritableByNewTypes → PropertyMetaInformation

Abstract Value Members

  1. abstract def isInheritable(analysisMode: AnalysisMode): Boolean

    Permalink

Concrete 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. final def eq(arg0: AnyRef): Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def id: Int

    Permalink
    Definition Classes
    PropertyMetaInformation → PropertyKind
  12. final def isFinal: Boolean

    Permalink
    Definition Classes
    Property
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def isRefineable: Boolean

    Permalink
    Definition Classes
    InheritableByNewTypes → Property
  15. final def key: PropertyKey[InheritableByNewTypes]

    Permalink
    Definition Classes
    InheritableByNewTypes → PropertyMetaInformation
  16. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  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 Property

Inherited from PropertyMetaInformation

Inherited from PropertyKind

Inherited from AnyRef

Inherited from Any

Ungrouped