com.jscape.util.reflection

## Class MethodInvoker<T>

- java.lang.Object
- - com.jscape.util.functor.UnaryFunction<java.lang.Object,T>
  - - com.jscape.util.reflection.MethodInvoker<T>

- All Implemented Interfaces:
    java.io.Serializable

      public class MethodInvoker<T>
      extends com.jscape.util.functor.UnaryFunction<java.lang.Object,T>

  Author:
    Alex Usun
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.jscape.util.functor.UnaryFunction

      `com.jscape.util.functor.UnaryFunction.Chain<T,R,U>, com.jscape.util.functor.UnaryFunction.Constant<T,U>, com.jscape.util.functor.UnaryFunction.Evaluator<V,R>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MethodInvoker(com.jscape.util.functor.UnaryPredicate<? super java.lang.reflect.Method> predicate, java.lang.Object... args)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `evaluate(java.lang.Object value)`
    `static <T> T` | `getProperty(java.lang.Object target, java.lang.String propertyName)`
    `static <T> T` | `getProperty(java.lang.Object target, java.lang.String propertyName, java.lang.Object argument)`
    `static <T> T` | `invoke(java.lang.Object target, java.lang.String methodName, java.lang.Class[] argTypes, java.lang.Object... args)`
    `static <T> T` | `invoke(java.lang.Object target, java.lang.String methodName, java.lang.Object... args)`
    `static <T> T` | `invoke(java.lang.Object target, com.jscape.util.functor.UnaryPredicate<? super java.lang.reflect.Method> predicate, java.lang.Object... args)`
    `static void` | `setProperty(java.lang.Object target, java.lang.String propertyName, java.lang.Object argument)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class com.jscape.util.functor.UnaryFunction

      `constant, then`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### MethodInvoker

          public MethodInvoker(com.jscape.util.functor.UnaryPredicate<? super java.lang.reflect.Method> predicate,
                               java.lang.Object... args)

  - ### Method Detail

    - #### invoke

          public static <T> T invoke(java.lang.Object target,
                                     com.jscape.util.functor.UnaryPredicate<? super java.lang.reflect.Method> predicate,
                                     java.lang.Object... args)
                              throws ReflectionException

      Throws:
        `ReflectionException`

    - #### invoke

          public static <T> T invoke(java.lang.Object target,
                                     java.lang.String methodName,
                                     java.lang.Class[] argTypes,
                                     java.lang.Object... args)
                              throws ReflectionException

      Throws:
        `ReflectionException`

    - #### invoke

          public static <T> T invoke(java.lang.Object target,
                                     java.lang.String methodName,
                                     java.lang.Object... args)
                              throws ReflectionException

      Throws:
        `ReflectionException`

    - #### setProperty

          public static void setProperty(java.lang.Object target,
                                         java.lang.String propertyName,
                                         java.lang.Object argument)
                                  throws ReflectionException

      Throws:
        `ReflectionException`

    - #### getProperty

          public static <T> T getProperty(java.lang.Object target,
                                          java.lang.String propertyName,
                                          java.lang.Object argument)
                                   throws ReflectionException

      Throws:
        `ReflectionException`

    - #### getProperty

          public static <T> T getProperty(java.lang.Object target,
                                          java.lang.String propertyName)
                                   throws ReflectionException

      Throws:
        `ReflectionException`

    - #### evaluate

          public T evaluate(java.lang.Object value)

      Specified by:
        `evaluate` in class `com.jscape.util.functor.UnaryFunction<java.lang.Object,T>`
      Parameters:
        `value` - value
      Returns:
        R instance

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © JSCAPE LLC. 1999-2019. All Rights Reserved