Packages

c

org.opalj.fpcf.analyses

ClassImmutabilityAnalysis

class ClassImmutabilityAnalysis extends FPCFAnalysis

Determines the mutability of instances of a specific class. In case the class is abstract the (implicit) assumption is made that all abstract methods (if any) are/can be implemented without necessarily/always requiring additional state; i.e., only the currently defined fields are taken into consideration. An interfaces is always considered to be immutable. If you need to know if all possible instances of an interface or some type; i.e., all instances of the classes that implement the respective interface/inherit from some class are immutable, you can query the org.opalj.fpcf.properties.TypeImmutability property.

In case of incomplete class hierarchies or if the class hierarchy is complete, but some class files are not found the sound approximation is done that the respective classes are mutable.

This analysis uses the org.opalj.fpcf.properties.FieldMutability property to determine those fields which could be final, but which are not declared as final.

TODO Discuss the case if a constructor calls an instance method which is overrideable (See Verifiable Functional Purity Paper for some arguements.)

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ClassImmutabilityAnalysis
  2. FPCFAnalysis
  3. ProjectBasedAnalysis
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ClassImmutabilityAnalysis(project: SomeProject)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. final def ch: ClassHierarchy
    Definition Classes
    ProjectBasedAnalysis
  6. implicit final def classHierarchy: ClassHierarchy
    Definition Classes
    ProjectBasedAnalysis
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. def determineClassImmutability(superClassType: ObjectType, superClassInformation: EOptionP[Entity, Property], superClassMutabilityIsFinal: Boolean, lazyComputation: Boolean)(cf: ClassFile): PropertyComputationResult

    Determines the immutability of instances of the given class type t.

    Determines the immutability of instances of the given class type t.

    superClassType

    The direct super class of the given object type t. Can be null if superClassMutability is ImmutableObject.

    superClassInformation

    The mutability of the given super class. The mutability must not be "MutableObject"; this case has to be handled explicitly. Hence, the mutability is either unknown, immutable or (at least) conditionally immutable.

  9. def doDetermineClassImmutability(e: Entity): PropertyComputationResult
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. implicit final def logContext: LogContext
    Definition Classes
    ProjectBasedAnalysis
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def p: Project[_]
    Definition Classes
    ProjectBasedAnalysis
  21. val project: SomeProject
  22. implicit final val propertyStore: PropertyStore
    Definition Classes
    FPCFAnalysis
  23. final def ps: PropertyStore
    Definition Classes
    FPCFAnalysis
  24. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from FPCFAnalysis

Inherited from ProjectBasedAnalysis

Inherited from AnyRef

Inherited from Any

Ungrouped