Enum ConfigValueResolver.ElementPolicy
- java.lang.Object
-
- java.lang.Enum<ConfigValueResolver.ElementPolicy>
-
- fish.payara.nucleus.microprofile.config.spi.ConfigValueResolver.ElementPolicy
-
- All Implemented Interfaces:
Serializable
,Comparable<ConfigValueResolver.ElementPolicy>
- Enclosing interface:
- ConfigValueResolver
public static enum ConfigValueResolver.ElementPolicy extends Enum<ConfigValueResolver.ElementPolicy>
What to do when collection element conversion fails.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FAIL
Element conversion failure immediately fails overall array conversion.NULL
Element conversion failure sets null for failing elements in the result array.SKIP
Element conversion failure skips the failing element in the result array unless all elements fail which also fails overall conversion.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConfigValueResolver.ElementPolicy
valueOf(String name)
Returns the enum constant of this type with the specified name.static ConfigValueResolver.ElementPolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FAIL
public static final ConfigValueResolver.ElementPolicy FAIL
Element conversion failure immediately fails overall array conversion. Note that this causes the use of provided defaults unlessConfigValueResolver.throwOnFailedConversion()
is used as well.
-
SKIP
public static final ConfigValueResolver.ElementPolicy SKIP
Element conversion failure skips the failing element in the result array unless all elements fail which also fails overall conversion.
-
NULL
public static final ConfigValueResolver.ElementPolicy NULL
Element conversion failure sets null for failing elements in the result array. Note that this fails conversion for primitive arrays as null is not allowed.
-
-
Method Detail
-
values
public static ConfigValueResolver.ElementPolicy[] 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 (ConfigValueResolver.ElementPolicy c : ConfigValueResolver.ElementPolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ConfigValueResolver.ElementPolicy 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
-
-