com.jscape.util.reflection

## Class FieldSetter

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

- All Implemented Interfaces:
    java.io.Serializable

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

  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
    `FieldSetter(com.jscape.util.functor.UnaryPredicate<? super java.lang.reflect.Field> predicate, java.lang.Object value)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `evaluate(java.lang.Object value)`
    `static java.lang.Object` | `set(java.lang.Object target, java.lang.String field, java.lang.Object value)`
    `static java.lang.Object` | `set(java.lang.Object target, com.jscape.util.functor.UnaryPredicate<? super java.lang.reflect.Field> predicate, java.lang.Object value)`
    `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

    - #### FieldSetter

          public FieldSetter(com.jscape.util.functor.UnaryPredicate<? super java.lang.reflect.Field> predicate,
                             java.lang.Object value)

  - ### Method Detail

    - #### set

          public static java.lang.Object set(java.lang.Object target,
                                             com.jscape.util.functor.UnaryPredicate<? super java.lang.reflect.Field> predicate,
                                             java.lang.Object value)
                                      throws ReflectionException

      Throws:
        `ReflectionException`

    - #### set

          public static java.lang.Object set(java.lang.Object target,
                                             java.lang.String field,
                                             java.lang.Object value)
                                      throws ReflectionException

      Throws:
        `ReflectionException`

    - #### evaluate

          public java.lang.Object evaluate(java.lang.Object value)

      Specified by:
        `evaluate` in class `com.jscape.util.functor.UnaryFunction<java.lang.Object,java.lang.Object>`
      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