Package com.fasterxml.jackson.core
Interface FormatFeature
- All Superinterfaces:
JacksonFeature
- All Known Implementing Classes:
FromXmlParser.Feature,JsonReadFeature,JsonWriteFeature,ToXmlGenerator.Feature
Marker interface that is to be implemented by data format - specific features.
Interface used since Java Enums can not extend classes or other Enums, but
they can implement interfaces; and as such we may be able to use limited
amount of generic functionality.
Since 2.12 this is more of an extra marker feature, as its core API is now
defined in more general JacksonFeature.
- Since:
- 2.6
-
Method Summary
Modifier and TypeMethodDescriptionbooleanAccessor for checking whether this feature is enabled by default.booleanenabledIn(int flags) Convenience method for checking whether feature is enabled in given bitmaskintgetMask()Returns bit mask for this feature instance; must be a single bit, that is of form(1 << N)
-
Method Details
-
enabledByDefault
boolean enabledByDefault()Accessor for checking whether this feature is enabled by default.- Specified by:
enabledByDefaultin interfaceJacksonFeature- Returns:
- Whether this instance is enabled by default or not
-
getMask
int getMask()Returns bit mask for this feature instance; must be a single bit, that is of form(1 << N)- Specified by:
getMaskin interfaceJacksonFeature- Returns:
- Bit mask of this feature
-
enabledIn
boolean enabledIn(int flags) Convenience method for checking whether feature is enabled in given bitmask- Specified by:
enabledInin interfaceJacksonFeature- Parameters:
flags- Bit field that contains a set of enabled features of this type- Returns:
- True if this feature is enabled in passed bit field
-