Package org.modelmapper.spi
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
ValueWriter.Member<T>
A member of a given destination
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ValueWriter.Member<T>
getMember(Class<T> destinationType, String memberName)
boolean
isResolveMembersSupport()
Returns whether the value writer is supporting on resolving the members.Collection<String>
memberNames(Class<T> destinationType)
Returns all member names for thedestinationType
object, elsenull
if the destination has no members.void
setValue(T destination, Object value, String memberName)
Returns the value from thedestination
object for thememberName
.
-
-
-
Method Detail
-
setValue
void setValue(T destination, Object value, String memberName)
Returns the value from thedestination
object for thememberName
.- Throws:
IllegalArgumentException
- if thememberName
is invalid for thedestination
-
getMember
ValueWriter.Member<T> getMember(Class<T> destinationType, String memberName)
- Parameters:
destinationType
- the destination typememberName
- the name of member
-
memberNames
Collection<String> memberNames(Class<T> destinationType)
Returns all member names for thedestinationType
object, elsenull
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, returnfalse
-
-