Package arez.spy

Interface ObservableValueInfo

All Superinterfaces:
ElementInfo

public interface ObservableValueInfo extends ElementInfo
A representation of an ObservableValue instance exposed to spy framework.
  • Method Details

    • isComputableValue

      Return true if the Observable is a ComputableValue.
      Returns:
      true if the Observable is a ComputableValue.
    • asComputableValue

      Convert the Observable to a ComputableValue. This method should only be called if isComputableValue() returns true.
      Returns:
      the ComputableValue instance.
    • getObservers

      Return the list of observers for the Observable. The list is an immutable copy of the observers of the ObservableValue.
      Returns:
      the list of observers for Observable.
    • getComponent

      Return the component for the Observable. This method should not be invoked if Arez.areNativeComponentsEnabled() returns false.
      Returns:
      the component that contains Observable if any.
    • hasAccessor

      @OmitSymbol(unless="arez.enable_property_introspection") boolean hasAccessor()
      Return true if the specified Observable has an accessor. This method should not be invoked if Arez.arePropertyIntrospectorsEnabled() returns false.
      Returns:
      true if an accessor is available.
    • getValue

      @OmitSymbol(unless="arez.enable_property_introspection") @Nullable Object getValue() throws Throwable
      Return the value of the specified Observable. This method should only be invoked if Arez.arePropertyIntrospectorsEnabled() returns true and hasAccessor() for the same element returns true.
      Returns:
      the value of the observable.
      Throws:
      Throwable - if the property accessor throws an exception.
    • hasMutator

      @OmitSymbol(unless="arez.enable_property_introspection") boolean hasMutator()
      Return true if the specified Observable has a mutator. This method should not be invoked if Arez.arePropertyIntrospectorsEnabled() returns false.
      Returns:
      true if a mutator is available.
    • setValue

      @OmitSymbol(unless="arez.enable_property_introspection") void setValue(@Nullable Object value) throws Throwable
      Set the value of the specified Observable. This method should only be invoked if Arez.arePropertyIntrospectorsEnabled() returns true and hasMutator() for the same element returns true.
      Parameters:
      value - the value to set
      Throws:
      Throwable - if the property accessor throws an exception.