public enum NullValueCheckStrategy extends Enum<NullValueCheckStrategy>
Note: some types of mappings (collections, maps), in which MapStruct is instructed to use a getter or adder
as target accessor see CollectionMappingStrategy
, MapStruct will always generate a source property null
check, regardless the value of the NullValueCheckStrategy
to avoid addition of null
to the target
collection or map.
Enum Constant and Description |
---|
ALWAYS
This option always includes a null check.
|
ON_IMPLICIT_CONVERSION
This option includes a null check.
|
Modifier and Type | Method and Description |
---|---|
static NullValueCheckStrategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NullValueCheckStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NullValueCheckStrategy ON_IMPLICIT_CONVERSION
public static final NullValueCheckStrategy ALWAYS
public static NullValueCheckStrategy[] values()
for (NullValueCheckStrategy c : NullValueCheckStrategy.values()) System.out.println(c);
public static NullValueCheckStrategy 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.