S
- source classD
- destination classpublic interface DeclarativeMap<S,D>
constructDestinationObjectUsing(java.util.function.Supplier)
zero or one timebeforeMap(com.github.erchu.beancp.Action)
zero or many timesuseConvention(com.github.erchu.beancp.MapConvention)
zero or one timebind(java.util.function.Supplier, java.util.function.Consumer, com.github.erchu.beancp.BindingOption...)
,
bindConstant(java.lang.Object, java.util.function.Consumer, com.github.erchu.beancp.BindingOption...)
,
mapInner(java.util.function.Supplier, java.util.function.Consumer, java.lang.Class, com.github.erchu.beancp.BindingOption[])
and
mapInner(java.util.function.Supplier, java.util.function.Consumer, java.util.function.Supplier, java.lang.Class, com.github.erchu.beancp.BindingOption[])
methods zero or many times in any orderafterMap(com.github.erchu.beancp.Action)
zero or many timesModifier and Type | Method and Description |
---|---|
DeclarativeMap<S,D> |
afterMap(Action action)
Action to be performed before mappings.
|
DeclarativeMap<S,D> |
afterMap(java.util.function.Consumer<Mapper> action)
Action to be performed before mappings.
|
DeclarativeMap<S,D> |
beforeMap(Action action)
Action to be performed after mappings.
|
DeclarativeMap<S,D> |
beforeMap(java.util.function.Consumer<Mapper> action)
Action to be performed after mappings.
|
<T> DeclarativeMap<S,D> |
bind(java.util.function.Supplier<T> fromFunction,
java.util.function.Consumer<T> toMember,
BindingOption<S,D,T>... options)
Adds calculated member binding to destination member or members.
|
<T> DeclarativeMap<S,D> |
bindConstant(T constantValue,
java.util.function.Consumer<T> toMember,
BindingOption<S,D,T>... options)
Adds constant binding to destination member or members.
|
DeclarativeMap<S,D> |
constructDestinationObjectUsing(java.util.function.Supplier<D> destinationObjectBuilder)
Operation used to build destination object.
|
<SI,DI> DeclarativeMap<S,D> |
mapInner(java.util.function.Supplier<SI> fromFunction,
java.util.function.Consumer<DI> toMember,
Class<DI> toMemberClass,
BindingOption<S,D,DI>... options)
Adds inner object mapping.
|
<SI,DI> DeclarativeMap<S,D> |
mapInner(java.util.function.Supplier<SI> fromFunction,
java.util.function.Consumer<DI> toMember,
java.util.function.Supplier<DI> toMemberGetter,
Class<DI> toMemberClass,
BindingOption<S,D,DI>... options)
Adds inner object mapping.
|
DeclarativeMap<S,D> |
useConvention(MapConvention MapConvention)
Adds mappings using convention.
|
DeclarativeMap<S,D> constructDestinationObjectUsing(java.util.function.Supplier<D> destinationObjectBuilder)
destinationObjectBuilder
- destination object builder, must be thread-safe.DeclarativeMap<S,D> beforeMap(Action action)
action
- action to be executed after mappings, must be thread-safe.DeclarativeMap<S,D> beforeMap(java.util.function.Consumer<Mapper> action)
action
- action to be executed after mappings, must be thread-safe.DeclarativeMap<S,D> useConvention(MapConvention MapConvention)
bind(java.util.function.Supplier, java.util.function.Consumer, com.github.erchu.beancp.BindingOption...)
and
bindConstant(java.lang.Object, java.util.function.Consumer, com.github.erchu.beancp.BindingOption...)
.MapConvention
- convention to use. Must be thread-safe.<T> DeclarativeMap<S,D> bind(java.util.function.Supplier<T> fromFunction, java.util.function.Consumer<T> toMember, BindingOption<S,D,T>... options)
T
- value data typefromFunction
- calculated member function, must be thread-safe.toMember
- destination class member, must be thread-safe.options
- additional mapping options<T> DeclarativeMap<S,D> bindConstant(T constantValue, java.util.function.Consumer<T> toMember, BindingOption<S,D,T>... options)
T
- value data typeconstantValue
- constant valuetoMember
- destination class member, must be thread-safe.options
- additional mapping options<SI,DI> DeclarativeMap<S,D> mapInner(java.util.function.Supplier<SI> fromFunction, java.util.function.Consumer<DI> toMember, java.util.function.Supplier<DI> toMemberGetter, Class<DI> toMemberClass, BindingOption<S,D,DI>... options)
SI
- source value data typeDI
- destination value data typefromFunction
- calculated member function, must be thread-safe.toMember
- destination class member setter, must be thread-safe.toMemberGetter
- destination class member get, must be thread-safe.toMemberClass
- destination class member typeoptions
- additional mapping options<SI,DI> DeclarativeMap<S,D> mapInner(java.util.function.Supplier<SI> fromFunction, java.util.function.Consumer<DI> toMember, Class<DI> toMemberClass, BindingOption<S,D,DI>... options)
SI
- source value data typeDI
- destination value data typefromFunction
- calculated member function, must be thread-safe.toMember
- destination class member setter, must be thread-safe.toMemberClass
- destination class member typeoptions
- additional mapping optionsDeclarativeMap<S,D> afterMap(Action action)
action
- action to be executed before mappings, must be thread-safe.DeclarativeMap<S,D> afterMap(java.util.function.Consumer<Mapper> action)
action
- action to be executed before mappings, must be thread-safe.Copyright © 2014. All rights reserved.