Package arez.spy
Interface ComputableValueInfo
- All Superinterfaces:
ElementInfo
A representation of a ComputableValue instance exposed to spy framework.
-
Method Summary
Modifier and TypeMethodDescriptionReturn the component for the ComputableValue.Return the list of dependencies of the ComputableValue.Return the list of observers for ComputableValue.Return the priority of the ComputableValue.getValue()
Return the value of the ComputableValue.boolean
isActive()
Return true if the ComputableValue is active.boolean
Return true if the ComputableValue is "computing".Methods inherited from interface arez.spy.ElementInfo
getName, isDisposed
-
Method Details
-
isComputing
boolean isComputing()Return true if the ComputableValue is "computing". This implies that the current transaction or one of the parent transactions is calculating the ComputableValue at the moment.- Returns:
- true if there is a transaction active.
-
getPriority
Return the priority of the ComputableValue.- Returns:
- the priority of the ComputableValue.
-
isActive
boolean isActive()Return true if the ComputableValue is active. A ComputableValue is active if there is one or more Observers and the value will be calculated.- Returns:
- true if the ComputableValue is active.
-
getObservers
Return the list of observers for ComputableValue. The list is an immutable copy of the observers of theComputableValue
.- Returns:
- the list of observers for ComputableValue.
-
getDependencies
Return the list of dependencies of the ComputableValue. The list is an immutable copy of the dependencies of theComputableValue
. If theComputableValue
is currently being computed (i.e.isComputing()
returns true) then the dependencies are provisional and may be added to as transaction completes.- Returns:
- the list of dependencies for ComputableValue.
-
getComponent
Return the component for the ComputableValue. This method should not be invoked ifArez.areNativeComponentsEnabled()
returns false.- Returns:
- the component that contains ComputableValue if any.
-
getValue
@OmitSymbol(unless="arez.enable_property_introspection") @Nullable Object getValue() throws ThrowableReturn the value of the ComputableValue. This method should only be invoked ifArez.arePropertyIntrospectorsEnabled()
returns true.- Returns:
- the value of the ComputableValue.
- Throws:
Throwable
- if the property accessor throws an exception.
-