org.xerial.json
Enum JSONErrorCode

java.lang.Object
  extended by java.lang.Enum<JSONErrorCode>
      extended by org.xerial.json.JSONErrorCode
All Implemented Interfaces:
Serializable, Comparable<JSONErrorCode>, ErrorCode

public enum JSONErrorCode
extends Enum<JSONErrorCode>
implements ErrorCode

Author:
leo

Enum Constant Summary
CannotConvertToJSONValue
           
InvalidBeanClass
           
InvalidJSONData
           
JSONValueIsNotFound
           
KeyIsNotFound
           
NotAJSONNumber
           
NotAJSONObject
           
NotAJSONString
           
NotInAJSONArray
           
NotInAJSONObject
           
NotInAJSONString
           
ParseError
           
UnexpectedEndOfJSON
           
 
Method Summary
 String getCodeName()
           
 String getDescription()
           
static JSONErrorCode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static JSONErrorCode[] 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

InvalidJSONData

public static final JSONErrorCode InvalidJSONData

KeyIsNotFound

public static final JSONErrorCode KeyIsNotFound

NotAJSONNumber

public static final JSONErrorCode NotAJSONNumber

NotAJSONString

public static final JSONErrorCode NotAJSONString

NotAJSONObject

public static final JSONErrorCode NotAJSONObject

CannotConvertToJSONValue

public static final JSONErrorCode CannotConvertToJSONValue

JSONValueIsNotFound

public static final JSONErrorCode JSONValueIsNotFound

NotInAJSONObject

public static final JSONErrorCode NotInAJSONObject

NotInAJSONArray

public static final JSONErrorCode NotInAJSONArray

UnexpectedEndOfJSON

public static final JSONErrorCode UnexpectedEndOfJSON

ParseError

public static final JSONErrorCode ParseError

InvalidBeanClass

public static final JSONErrorCode InvalidBeanClass

NotInAJSONString

public static final JSONErrorCode NotInAJSONString
Method Detail

values

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

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

valueOf

public static JSONErrorCode 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

getCodeName

public String getCodeName()
Specified by:
getCodeName in interface ErrorCode

getDescription

public String getDescription()
Specified by:
getDescription in interface ErrorCode


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.