Class InjectedValue<T>

    • Constructor Detail

      • InjectedValue

        public InjectedValue()
        Deprecated.
        Construct a new instance.
    • Method Detail

      • getValue

        public T getValue()
                   throws IllegalStateException
        Deprecated.
        Get the actual dependency value.
        Specified by:
        getValue in interface Value<T>
        Returns:
        the actual dependency value
        Throws:
        IllegalStateException - if the value is time-sensitive and the current state does not allow retrieval.
      • setValue

        public void setValue​(Value<T> value)
        Deprecated.
        Set the value to be injected to a Value instance.
        Parameters:
        value - the value to set, cannot be null
      • getOptionalValue

        public T getOptionalValue()
        Deprecated.
        Get the value if it was injected, or return null if it was not.
        Returns:
        the value or null if it was not injected
      • uninject

        public void uninject()
        Uninject the given value (in other words, cancel or undo a previous injection). Only called after inject() has been called.
        Specified by:
        uninject in interface Injector<T>
      • getStoredValue

        protected Value<T> getStoredValue()
        Get the value object stored in this injector.
        Returns:
        the value object
      • setStoredValue

        protected Value<T> setStoredValue​(Value<T> value)
        Set the value object stored in this injector (must not be null).
        Parameters:
        value - the value object (must not be null)
        Returns:
        the old value object, or null if none was stored