Package org.mapstruct.control
Enum MappingControl.Use
- java.lang.Object
-
- java.lang.Enum<MappingControl.Use>
-
- org.mapstruct.control.MappingControl.Use
-
- All Implemented Interfaces:
Serializable
,Comparable<MappingControl.Use>
- Enclosing class:
- MappingControl
public static enum MappingControl.Use extends Enum<MappingControl.Use>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BUILT_IN_CONVERSION
Controls the mapping, allows for type conversion from source type to target typeCOMPLEX_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 methodDIRECT
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.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Enum Constant Detail
-
BUILT_IN_CONVERSION
public static final MappingControl.Use BUILT_IN_CONVERSION
Controls the mapping, allows for type conversion from source type to target typeType conversions are typically supported directly in Java. The "toString()" is such an example, which allows for mapping for instance a
Number
type to aString
.Please refer to the MapStruct guide for more info.
- Since:
- 1.4
-
COMPLEX_MAPPING
public static final MappingControl.Use 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
- Since:
- 1.4
-
DIRECT
public static final MappingControl.Use DIRECT
Controls the mapping, allows for a direct mapping from source type to target type.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.- Since:
- 1.4
-
MAPPING_METHOD
public static final MappingControl.Use MAPPING_METHOD
Controls the mapping, allows for Direct Mapping from source type to target type.The mapping method can be either a custom referred mapping method, or a MapStruct built in mapping method.
- Since:
- 1.4
-
-
Method Detail
-
values
public static MappingControl.Use[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MappingControl.Use c : MappingControl.Use.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MappingControl.Use valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-