org.codehaus.jackson
Enum JsonGenerator.Feature

java.lang.Object
  extended by java.lang.Enum<JsonGenerator.Feature>
      extended by org.codehaus.jackson.JsonGenerator.Feature
All Implemented Interfaces:
Serializable, Comparable<JsonGenerator.Feature>
Enclosing class:
JsonGenerator

public static enum JsonGenerator.Feature
extends Enum<JsonGenerator.Feature>

Enumeration that defines all togglable features for generators.


Enum Constant Summary
AUTO_CLOSE_JSON_CONTENT
           
AUTO_CLOSE_TARGET
          Feature that determines whether generator will automatically close underlying output target that is NOT owned by the generator.
QUOTE_FIELD_NAMES
           
QUOTE_NON_NUMERIC_NUMBERS
           
WRITE_NUMBERS_AS_STRINGS
           
 
Method Summary
static int collectDefaults()
          Method that calculates bit set (flags) of all features that are enabled by default.
 boolean enabledByDefault()
           
 int getMask()
           
static JsonGenerator.Feature valueOf(String name)
          Returns the enum constant of this type with the specified name.
static JsonGenerator.Feature[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

AUTO_CLOSE_TARGET

public static final JsonGenerator.Feature AUTO_CLOSE_TARGET
Feature that determines whether generator will automatically close underlying output target that is NOT owned by the generator. If disabled, calling application has to separately close the underlying OutputStream and Writer instances used to create the generator. If enabled, generator will handle closing, as long as generator itself gets closed: this happens when end-of-input is encountered, or generator is closed by a call to JsonGenerator.close().

Feature is enabled by default.


AUTO_CLOSE_JSON_CONTENT

public static final JsonGenerator.Feature AUTO_CLOSE_JSON_CONTENT

QUOTE_FIELD_NAMES

public static final JsonGenerator.Feature QUOTE_FIELD_NAMES

QUOTE_NON_NUMERIC_NUMBERS

public static final JsonGenerator.Feature QUOTE_NON_NUMERIC_NUMBERS

WRITE_NUMBERS_AS_STRINGS

public static final JsonGenerator.Feature WRITE_NUMBERS_AS_STRINGS
Method Detail

values

public static JsonGenerator.Feature[] 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 (JsonGenerator.Feature c : JsonGenerator.Feature.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static JsonGenerator.Feature 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 name
NullPointerException - if the argument is null

collectDefaults

public static int collectDefaults()
Method that calculates bit set (flags) of all features that are enabled by default.


enabledByDefault

public boolean enabledByDefault()

getMask

public int getMask()