|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Configuration
Configures conventions used during the matching process.
Nested Class Summary | |
---|---|
static class |
Configuration.AccessLevel
The level at and below which properties can be accessed. |
Method Summary | |
---|---|
Configuration |
addConverter(ConditionalConverter<?,?> converter)
Registers the conditional converter . |
Configuration |
copy()
Returns a copy of the Configuration. |
Configuration |
enableFieldMatching(boolean enabled)
Sets whether field matching should be enabled. |
NameTokenizer |
getDestinationNameTokenizer()
Returns the destination name tokenizer. |
NameTransformer |
getDestinationNameTransformer()
Returns the destination name transformer. |
NamingConvention |
getDestinationNamingConvention()
Returns the destination naming convention. |
Configuration.AccessLevel |
getFieldAccessLevel()
Returns the field access level. |
MatchingStrategy |
getMatchingStrategy()
Gets the matching strategy. |
Configuration.AccessLevel |
getMethodAccessLevel()
Returns the method access level. |
Provider<?> |
getProvider()
Returns the Provider used for provisioning destination object instances. |
NameTokenizer |
getSourceNameTokenizer()
Returns the source name tokenizer. |
NameTransformer |
getSourceNameTransformer()
Returns the source name transformer. |
NamingConvention |
getSourceNamingConvention()
Gets the source naming convention. |
Configuration |
ignoreAmbiguity(boolean ignore)
Sets whether destination properties that match more than one source property should be ignored. |
boolean |
isAmbiguityIgnored()
Returns true if ambiguous properties are ignored or false if they will result
in an exception. |
boolean |
isFieldMatchingEnabled()
Returns whether field matching is enabled. |
Configuration |
setDestinationNameTokenizer(NameTokenizer nameTokenizer)
Sets the tokenizer to be applied to destination property and class names during the matching process. |
Configuration |
setDestinationNameTransformer(NameTransformer nameTransformer)
Sets the name transformer used to transform destination property and class names during the matching process. |
Configuration |
setDestinationNamingConvention(NamingConvention namingConvention)
Sets the convention used to identify destination property names during the matching process. |
Configuration |
setFieldAccessLevel(Configuration.AccessLevel accessLevel)
Indicates that fields should be eligible for matching at the given accessLevel . |
Configuration |
setMatchingStrategy(MatchingStrategy matchingStrategy)
Sets the strategy used to match source properties to destination properties. |
Configuration |
setMethodAccessLevel(Configuration.AccessLevel accessLevel)
Indicates that methods should be eligible for matching at the given accessLevel . |
Configuration |
setProvider(Provider<?> provider)
Sets the provider to use for providing destination object instances. |
Configuration |
setSourceNameTokenizer(NameTokenizer nameTokenizer)
Sets the tokenizer to be applied to source property and class names during the matching process. |
Configuration |
setSourceNameTransformer(NameTransformer nameTransformer)
Sets the name transformer used to transform source property and class names during the matching process. |
Configuration |
setSourceNamingConvention(NamingConvention namingConvention)
Sets the convention used to identify source property names during the matching process. |
Method Detail |
---|
Configuration addConverter(ConditionalConverter<?,?> converter)
converter
. The converter
will be first in list of
converters used to fulfill mapping requests.
This method is part of the ModelMapper SPI.
converter
- to register
IllegalArgumentException
- if converter
is nullConfiguration copy()
Configuration enableFieldMatching(boolean enabled)
false
.
enabled
- whether field matching is enabledisFieldMatchingEnabled()
,
setFieldAccessLevel(AccessLevel)
NameTokenizer getDestinationNameTokenizer()
setDestinationNameTokenizer(NameTokenizer)
NameTransformer getDestinationNameTransformer()
setDestinationNameTransformer(NameTransformer)
NamingConvention getDestinationNamingConvention()
setDestinationNamingConvention(NamingConvention)
Configuration.AccessLevel getFieldAccessLevel()
setFieldAccessLevel(AccessLevel)
MatchingStrategy getMatchingStrategy()
setMatchingStrategy(MatchingStrategy)
Configuration.AccessLevel getMethodAccessLevel()
setMethodAccessLevel(AccessLevel)
Provider<?> getProvider()
setProvider(Provider)
NameTokenizer getSourceNameTokenizer()
setSourceNameTokenizer(NameTokenizer)
NameTransformer getSourceNameTransformer()
setSourceNameTransformer(NameTransformer)
NamingConvention getSourceNamingConvention()
setSourceNamingConvention(NamingConvention)
Configuration ignoreAmbiguity(boolean ignore)
ignore
- whether ambiguity is to be ignoredisAmbiguityIgnored()
boolean isAmbiguityIgnored()
true
if ambiguous properties are ignored or false
if they will result
in an exception.
ignoreAmbiguity(boolean)
boolean isFieldMatchingEnabled()
enableFieldMatching(boolean)
Configuration setDestinationNameTokenizer(NameTokenizer nameTokenizer)
IllegalArgumentException
- if nameTokenizer
is nullConfiguration setDestinationNameTransformer(NameTransformer nameTransformer)
IllegalArgumentException
- if nameTransformer
is nullConfiguration setDestinationNamingConvention(NamingConvention namingConvention)
IllegalArgumentException
- if namingConvention
is nullConfiguration setFieldAccessLevel(Configuration.AccessLevel accessLevel)
accessLevel
.
Note: Field access is only used when field
matching
is enabled.
IllegalArgumentException
- if accessLevel
is nullConfiguration.AccessLevel
,
enableFieldMatching(boolean)
Configuration setMatchingStrategy(MatchingStrategy matchingStrategy)
IllegalArgumentException
- if matchingStrategy
is nullConfiguration setMethodAccessLevel(Configuration.AccessLevel accessLevel)
accessLevel
.
IllegalArgumentException
- if accessLevel
is nullConfiguration.AccessLevel
Configuration setProvider(Provider<?> provider)
provider
to use for providing destination object instances.
provider
- to register
IllegalArgumentException
- if provider
is nullConfiguration setSourceNameTokenizer(NameTokenizer nameTokenizer)
IllegalArgumentException
- if nameTokenizer
is nullConfiguration setSourceNameTransformer(NameTransformer nameTransformer)
IllegalArgumentException
- if nameTransformer
is nullConfiguration setSourceNamingConvention(NamingConvention namingConvention)
IllegalArgumentException
- if namingConvention
is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |