Package com.alibaba.fastjson.parser
Enum Feature
- java.lang.Object
-
- java.lang.Enum<Feature>
-
- com.alibaba.fastjson.parser.Feature
-
- All Implemented Interfaces:
Serializable,Comparable<Feature>
public enum Feature extends Enum<Feature>
- Author:
- wenshao[szujobs@hotmail.com]
-
-
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description intmask
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intconfig(int features, Feature feature, boolean state)intgetMask()static booleanisEnabled(int features, Feature feature)static intof(Feature[] features)static FeaturevalueOf(String name)Returns the enum constant of this type with the specified name.static Feature[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
AutoCloseSource
public static final Feature AutoCloseSource
-
AllowComment
public static final Feature AllowComment
-
AllowUnQuotedFieldNames
public static final Feature AllowUnQuotedFieldNames
-
AllowSingleQuotes
public static final Feature AllowSingleQuotes
-
InternFieldNames
public static final Feature InternFieldNames
-
AllowISO8601DateFormat
public static final Feature AllowISO8601DateFormat
-
AllowArbitraryCommas
public static final Feature AllowArbitraryCommas
{"a":1,,,"b":2}
-
UseBigDecimal
public static final Feature UseBigDecimal
-
IgnoreNotMatch
public static final Feature IgnoreNotMatch
- Since:
- 1.1.2
-
SortFeidFastMatch
public static final Feature SortFeidFastMatch
- Since:
- 1.1.3
-
DisableASM
public static final Feature DisableASM
- Since:
- 1.1.3
-
DisableCircularReferenceDetect
public static final Feature DisableCircularReferenceDetect
- Since:
- 1.1.7
-
InitStringFieldAsEmpty
public static final Feature InitStringFieldAsEmpty
- Since:
- 1.1.10
-
SupportArrayToBean
public static final Feature SupportArrayToBean
- Since:
- 1.1.35
-
OrderedField
public static final Feature OrderedField
- Since:
- 1.2.3
-
DisableSpecialKeyDetect
public static final Feature DisableSpecialKeyDetect
- Since:
- 1.2.5
-
UseObjectArray
public static final Feature UseObjectArray
- Since:
- 1.2.9
-
SupportNonPublicField
public static final Feature SupportNonPublicField
- Since:
- 1.2.22, 1.1.54.android
-
IgnoreAutoType
public static final Feature IgnoreAutoType
- Since:
- 1.2.29
disable autotype key '@type'
-
DisableFieldSmartMatch
public static final Feature DisableFieldSmartMatch
- Since:
- 1.2.30
disable field smart match, improve performance in some scenarios.
-
SupportAutoType
public static final Feature SupportAutoType
- Since:
- 1.2.41, backport to 1.1.66.android
-
NonStringKeyAsString
public static final Feature NonStringKeyAsString
- Since:
- 1.2.42
-
CustomMapDeserializer
public static final Feature CustomMapDeserializer
- Since:
- 1.2.45
-
ErrorOnEnumNotMatch
public static final Feature ErrorOnEnumNotMatch
- Since:
- 1.2.55
-
TrimStringFieldValue
public static final Feature TrimStringFieldValue
- Since:
- 2.0.4
-
SupportClassForName
public static final Feature SupportClassForName
- Since:
- 2.0.4
-
ErrorOnNotSupportAutoType
public static final Feature ErrorOnNotSupportAutoType
- Since:
- 2.0.6
-
UseNativeJavaObject
public static final Feature UseNativeJavaObject
-
-
Method Detail
-
values
public static 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 (Feature c : 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 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 nameNullPointerException- if the argument is null
-
isEnabled
public static boolean isEnabled(int features, Feature feature)
-
config
public static int config(int features, Feature feature, boolean state)
-
of
public static int of(Feature[] features)
-
getMask
public final int getMask()
-
-