Interface ValueWriter<T>

Type Parameters:
T - destination type

public interface ValueWriter<T>
Writes values to a destination. Allows for integration with 3rd party libraries.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    A member of a given destination
  • Method Summary

    Modifier and Type
    Method
    Description
    getMember(Class<T> destinationType, String memberName)
    Returns the ValueWriter.Member from the destination within given memberName.
    boolean
    Returns whether the value writer is supporting on resolving the members.
    memberNames(Class<T> destinationType)
    Returns all member names for the destinationType object, else null if the destination has no members.
    void
    setValue(T destination, Object value, String memberName)
    Returns the value from the destination object for the memberName.
  • Method Details

    • setValue

      void setValue(T destination, Object value, String memberName)
      Returns the value from the destination object for the memberName.
      Throws:
      IllegalArgumentException - if the memberName is invalid for the destination
    • getMember

      ValueWriter.Member<T> getMember(Class<T> destinationType, String memberName)
      Returns the ValueWriter.Member from the destination within given memberName.
      Parameters:
      destinationType - the destination type
      memberName - the name of member
    • memberNames

      Collection<String> memberNames(Class<T> destinationType)
      Returns all member names for the destinationType object, else null if the destination has no members.
    • isResolveMembersSupport

      boolean isResolveMembersSupport()
      Returns whether the value writer is supporting on resolving the members.
      Returns:
      true if the value writer is supporting on resolving the members; otherwise, return false