Class/Object

org.opalj.fpcf.analysis

PurityAnalysis

Related Docs: object PurityAnalysis | package analysis

Permalink

class PurityAnalysis extends FPCFAnalysis

This analysis determines whether a method is pure. I.e., whether the method only operates on the given state (i.e., the method is pure) or depends on other state/mutable global state; the given state may include the state of the current object that is the receiver of the call if the object/receiver is immutable.

This analysis follows the definition found on wikipedia:

[...] a function may be considered a pure function if both of the following statements about the function hold:

Hence, using true constants (e.g., Math.e) is not a problem as well as creating intermediate (mutable) data structures. Furthermore, instance method based calls can also be pure if the receiving object is (effectively final) or was created as part of the evaluation of the method.

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

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. implicit final val classHierarchy: ClassHierarchy

    Permalink
    Definition Classes
    FPCFAnalysis
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def determinePurity(method: Method): PropertyComputationResult

    Permalink

    Determines the purity of the given method.

  8. final def eq(arg0: AnyRef): Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isClosedLibrary: Boolean

    Permalink
    Definition Classes
    FPCFAnalysis
  14. final def isDesktopApplication: Boolean

    Permalink
    Definition Classes
    FPCFAnalysis
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. final def isJEEApplication: Boolean

    Permalink
    Definition Classes
    FPCFAnalysis
  17. final def isOpenLibrary: Boolean

    Permalink
    Definition Classes
    FPCFAnalysis
  18. implicit final val logContext: LogContext

    Permalink
    Definition Classes
    FPCFAnalysis
  19. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  22. final val project: SomeProject

    Permalink
    Definition Classes
    PurityAnalysisFPCFAnalysis
  23. implicit final val propertyStore: PropertyStore

    Permalink
    Definition Classes
    FPCFAnalysis
  24. final def ps: PropertyStore

    Permalink
    Definition Classes
    FPCFAnalysis
  25. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from FPCFAnalysis

Inherited from AnyRef

Inherited from Any

Ungrouped