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_WRITE
The 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 int
INTERNAL_PROHIBIT_INTERNAL_BUFFER_ALLOCATE
Internal option for unit tests: Prohibit allocating internal buffers, except through the buffer recycler
-
Constructor Summary
Constructors Modifier Constructor Description private
TomlWriteFeature(boolean defaultState)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
collectDefaults()
boolean
enabledByDefault()
boolean
enabledIn(int flags)
int
getMask()
static TomlWriteFeature
valueOf(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:
enabledByDefault
in interfacecom.fasterxml.jackson.core.FormatFeature
- Specified by:
enabledByDefault
in interfacecom.fasterxml.jackson.core.util.JacksonFeature
-
enabledIn
public boolean enabledIn(int flags)
- Specified by:
enabledIn
in interfacecom.fasterxml.jackson.core.FormatFeature
- Specified by:
enabledIn
in interfacecom.fasterxml.jackson.core.util.JacksonFeature
-
getMask
public int getMask()
- Specified by:
getMask
in interfacecom.fasterxml.jackson.core.FormatFeature
- Specified by:
getMask
in interfacecom.fasterxml.jackson.core.util.JacksonFeature
-
-