|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<NodeType> com.github.fge.jackson.NodeType
public enum NodeType
Enumeration for the different types of JSON instances which can be encountered.
In addition to what the JSON RFC defines, JSON Schema has an integer
type, which is a numeric value without any fraction or exponent
part.
NOTE: will disappear in Jackson 2.2.x, which has an equivalent enumeration
Enum Constant Summary | |
---|---|
ARRAY
Array nodes |
|
BOOLEAN
Boolean nodes |
|
INTEGER
Integer nodes |
|
NULL
Number nodes (ie, decimal numbers) |
|
NUMBER
Object nodes |
|
OBJECT
Null nodes |
|
STRING
String nodes |
Method Summary | |
---|---|
static NodeType |
fromName(String name)
Given a type name, return the corresponding node type |
static NodeType |
getNodeType(JsonNode node)
Given a JsonNode as an argument, return its type. |
String |
toString()
|
static NodeType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static NodeType[] |
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, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final NodeType ARRAY
public static final NodeType BOOLEAN
public static final NodeType INTEGER
public static final NodeType NULL
public static final NodeType NUMBER
public static final NodeType OBJECT
public static final NodeType STRING
Method Detail |
---|
public static NodeType[] values()
for (NodeType c : NodeType.values()) System.out.println(c);
public static NodeType valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic String toString()
toString
in class Enum<NodeType>
public static NodeType fromName(String name)
name
- the type name
public static NodeType getNodeType(JsonNode node)
JsonNode
as an argument, return its type. The argument
MUST NOT BE NULL, and MUST NOT be a MissingNode
node
- the node to determine the type of
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |