Class MethodValue<T>

  • Type Parameters:
    T - the value type
    All Implemented Interfaces:
    Value<T>

    public final class MethodValue<T>
    extends java.lang.Object
    implements Value<T>
    A value which is produced by invoking a method.
    • Constructor Summary

      Constructors 
      Constructor Description
      MethodValue​(Value<java.lang.reflect.Method> methodValue, Value<?> targetValue, java.util.List<? extends Value<?>> parameters)
      Construct a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T getValue()
      Get the actual value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • methodValue

        private final Value<java.lang.reflect.Method> methodValue
      • targetValue

        private final Value<?> targetValue
      • parameters

        private final java.util.List<? extends Value<?>> parameters
    • Constructor Detail

      • MethodValue

        public MethodValue​(Value<java.lang.reflect.Method> methodValue,
                           Value<?> targetValue,
                           java.util.List<? extends Value<?>> parameters)
        Construct a new instance.
        Parameters:
        methodValue - the method to invoke
        targetValue - the target object on which to invoke this method
        parameters - the parameters to pass to the method
    • Method Detail

      • getValue

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