Top Description Fields Constructors Methods
org.codehaus.jettison.mapped

public Class DefaultConverter

extends Object
implements TypeConverter
Class Inheritance
All Implemented Interfaces
org.codehaus.jettison.mapped.TypeConverter

Default converter that tries to convert value to appropriate primitive (if fails, returns original string)
Author
Dejan Bosanac
Since
1.1

Field Summary

Modifier and TypeField and Description
private boolean
public static final boolean
private static final String
private static final int
private static final int
private static final int
private static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
private static Double
getDouble(String text)

Try to get a Double value efficiently, avoiding Exceptions

private static Integer
getInteger(String text)

Try to get an Integer value efficiently, avoiding Exceptions

private static Long
getLong(String text)

Try to get a Long value efficiently, avoiding Exceptions

public void
setEnforce32BitInt(boolean enforce32BitInt)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

enforce32BitIntback to summary
private boolean enforce32BitInt
ENFORCE_32BIT_INTEGERback to summary
public static final boolean ENFORCE_32BIT_INTEGER
ENFORCE_32BIT_INTEGER_KEYback to summary
private static final String ENFORCE_32BIT_INTEGER_KEY
MAX_LENGTH_INTEGERback to summary
private static final int MAX_LENGTH_INTEGER
MAX_LENGTH_INTEGER_NEGATIVEback to summary
private static final int MAX_LENGTH_INTEGER_NEGATIVE
MAX_LENGTH_LONGback to summary
private static final int MAX_LENGTH_LONG
MAX_LENGTH_LONG_NEGATIVEback to summary
private static final int MAX_LENGTH_LONG_NEGATIVE

Constructor Detail

DefaultConverterback to summary
public DefaultConverter()

Method Detail

convertToJSONPrimitiveback to summary
public Object convertToJSONPrimitive(String text)

Implements org.codehaus.jettison.mapped.TypeConverter.convertToJSONPrimitive.

getDoubleback to summary
private static Double getDouble(String text)

Try to get a Double value efficiently, avoiding Exceptions

getIntegerback to summary
private static Integer getInteger(String text)

Try to get an Integer value efficiently, avoiding Exceptions

getLongback to summary
private static Long getLong(String text)

Try to get a Long value efficiently, avoiding Exceptions

setEnforce32BitIntback to summary
public void setEnforce32BitInt(boolean enforce32BitInt)