001package arez.annotations; 002 003import arez.ComputableValue; 004 005/** 006 * Enumeration that describes the types of dependencies supported by an {@link arez.Observer} or a {@link ComputableValue}. 007 */ 008public enum DepType 009{ 010 /** 011 * The reactive element MUST have at least one dependency on an {@link arez.ObservableValue}. 012 * This means that the <code>computable</code> or <code>observed</code> method must invoke 013 * {@link arez.ObservableValue#reportObserved()} at least once within the scope of the method. 014 */ 015 AREZ, 016 /** 017 * The reactive element may have dependencies on zero or more {@link arez.ObservableValue} instances. 018 * Using this dependency type also allows for the scenario where the <code>computable</code> or 019 * <code>observed</code> does not invoke {@link arez.ObservableValue#reportObserved()} within the scope 020 * of the method. The <code>computable</code> or <code>observed</code> will not be re-scheduled by the 021 * runtime when there are no dependencies. (This is sometimes acceptable, particularly during when a 022 * collection of components are being disposed over multiple scheduling rounds). 023 */ 024 AREZ_OR_NONE, 025 /** 026 * The reactive element may have zero or more dependencies on {@link arez.ObservableValue} instances and/or 027 * may have dependencies on non-arez elements. The application can invoke {@link arez.Observer#reportStale()} 028 * or {@link ComputableValue#reportPossiblyChanged()} to indicate non-arez dependency has changed. 029 */ 030 AREZ_OR_EXTERNAL 031}