Enum TomlWriteFeature
- java.lang.Object
-
- java.lang.Enum<TomlWriteFeature>
-
- com.fasterxml.jackson.dataformat.toml.TomlWriteFeature
-
- All Implemented Interfaces:
com.fasterxml.jackson.core.FormatFeature,com.fasterxml.jackson.core.util.JacksonFeature,java.io.Serializable,java.lang.Comparable<TomlWriteFeature>
public enum TomlWriteFeature extends java.lang.Enum<TomlWriteFeature> implements com.fasterxml.jackson.core.FormatFeature
Enumeration that defines all togglable features for TOML generators.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FAIL_ON_NULL_WRITEThe TOML spec does not allow null values.
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean_defaultState(package private) int_mask(package private) static intINTERNAL_PROHIBIT_INTERNAL_BUFFER_ALLOCATEInternal option for unit tests: Prohibit allocating internal buffers, except through the buffer recycler
-
Constructor Summary
Constructors Modifier Constructor Description privateTomlWriteFeature(boolean defaultState)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intcollectDefaults()booleanenabledByDefault()booleanenabledIn(int flags)intgetMask()static TomlWriteFeaturevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static TomlWriteFeature[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FAIL_ON_NULL_WRITE
public static final TomlWriteFeature FAIL_ON_NULL_WRITE
The TOML spec does not allow null values. We instead write an empty string whenJsonGenerator.writeNull()by default.When this option is set, any attempt to write a null value will error instead.
-
-
Field Detail
-
INTERNAL_PROHIBIT_INTERNAL_BUFFER_ALLOCATE
static final int INTERNAL_PROHIBIT_INTERNAL_BUFFER_ALLOCATE
Internal option for unit tests: Prohibit allocating internal buffers, except through the buffer recycler- See Also:
- Constant Field Values
-
_defaultState
final boolean _defaultState
-
_mask
final int _mask
-
-
Method Detail
-
values
public static TomlWriteFeature[] 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 (TomlWriteFeature c : TomlWriteFeature.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TomlWriteFeature valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
collectDefaults
public static int collectDefaults()
-
enabledByDefault
public boolean enabledByDefault()
- Specified by:
enabledByDefaultin interfacecom.fasterxml.jackson.core.FormatFeature- Specified by:
enabledByDefaultin interfacecom.fasterxml.jackson.core.util.JacksonFeature
-
enabledIn
public boolean enabledIn(int flags)
- Specified by:
enabledInin interfacecom.fasterxml.jackson.core.FormatFeature- Specified by:
enabledInin interfacecom.fasterxml.jackson.core.util.JacksonFeature
-
getMask
public int getMask()
- Specified by:
getMaskin interfacecom.fasterxml.jackson.core.FormatFeature- Specified by:
getMaskin interfacecom.fasterxml.jackson.core.util.JacksonFeature
-
-