public static enum MappingControl.Use extends Enum<MappingControl.Use>
Enum Constant and Description |
---|
BUILT_IN_CONVERSION
Controls the mapping, allows for type conversion from source type to target type
Type conversions are typically supported directly in Java.
|
COMPLEX_MAPPING
Controls the mapping from source to target type, allows mapping by calling:
A type conversion, passed into a mapping method
A mapping method, passed into a type conversion
A mapping method passed into another mapping method
|
DIRECT
Controls the mapping, allows for a direct mapping from source type to target type.
|
MAPPING_METHOD
Controls the mapping, allows for Direct Mapping from source type to target type.
|
Modifier and Type | Method and Description |
---|---|
static MappingControl.Use |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MappingControl.Use[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MappingControl.Use BUILT_IN_CONVERSION
Type conversions are typically supported directly in Java. The "toString()" is such an example,
which allows for mapping for instance a Number
type to a String
.
Please refer to the MapStruct guide for more info.
public static final MappingControl.Use COMPLEX_MAPPING
public static final MappingControl.Use DIRECT
This means if source type and target type are of the same type, MapStruct will not perform any mappings anymore and assign the target to the source direct.
An exception are types from the package java
, which will be mapped always directly.
public static final MappingControl.Use MAPPING_METHOD
The mapping method can be either a custom referred mapping method, or a MapStruct built in mapping method.
public static MappingControl.Use[] values()
for (MappingControl.Use c : MappingControl.Use.values()) System.out.println(c);
public static MappingControl.Use valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2012-2021 MapStruct Authors; All rights reserved. Released under the Apache Software License 2.0.