Package org.mapstruct.control
Enum MappingControl.Use
- All Implemented Interfaces:
Serializable,Comparable<MappingControl.Use>,java.lang.constant.Constable
- Enclosing class:
MappingControl
Defines the options that can be used for the mapping control.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionControls the mapping, allows for type conversion from source type to target typeControls 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 methodControls the mapping, allows for a direct mapping from source type to target type.Controls the mapping, allows for Direct Mapping from source type to target type. -
Method Summary
Modifier and TypeMethodDescriptionstatic MappingControl.UseReturns 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 Details
-
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
Numbertype to aString.Please refer to the MapStruct guide for more info.
- Since:
- 1.4
-
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
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
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 Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-