class ClassImmutabilityAnalysis extends FPCFAnalysis
Determines the immutability of instances of a specific class. In the case of an abstract class 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 transitively 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 transitively immutable, you can query the 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 FieldImmutability property to determine the immutability of a class.
TODO Discuss the case if a constructor calls an instance method which is overrideable (See Verifiable Functional Purity Paper for some arguments.)
- Alphabetic
- By Inheritance
- ClassImmutabilityAnalysis
- FPCFAnalysis
- ProjectBasedAnalysis
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ClassImmutabilityAnalysis(project: SomeProject)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- final def ch: ClassHierarchy
- Definition Classes
- ProjectBasedAnalysis
- implicit final def classHierarchy: ClassHierarchy
- Definition Classes
- ProjectBasedAnalysis
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- val defaultTransitivelyImmutableTypes: Set[ObjectType]
- def determineClassImmutability(superClassType: ObjectType, superClassInformation: EOptionP[Entity, Property], superClassImmutabilityIsFinal: Boolean, lazyComputation: Boolean)(cf: ClassFile): ProperPropertyComputationResult
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 benull
ifsuperClassImmutability
isTransitivelyImmutable
.- 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.
- def determineGenericTypeBounds(classFile: ClassFile): Set[(String, String)]
- def doDetermineClassImmutability(e: Entity): ProperPropertyComputationResult
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit final def logContext: LogContext
- Definition Classes
- ProjectBasedAnalysis
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- implicit final def p: SomeProject
- Definition Classes
- ProjectBasedAnalysis
- val project: SomeProject
- Definition Classes
- ClassImmutabilityAnalysis → ProjectBasedAnalysis
- implicit final val propertyStore: PropertyStore
- Definition Classes
- FPCFAnalysis
- final def ps: PropertyStore
- Definition Classes
- FPCFAnalysis
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated