org.fusesource.restygwt.client
Class AbstractJsonEncoderDecoder<T>

java.lang.Object
  extended by org.fusesource.restygwt.client.AbstractJsonEncoderDecoder<T>
All Implemented Interfaces:
JsonEncoderDecoder<T>

public abstract class AbstractJsonEncoderDecoder<T>
extends Object
implements JsonEncoderDecoder<T>

Author:
Hiram Chirino, Dave Finch

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.fusesource.restygwt.client.JsonEncoderDecoder
JsonEncoderDecoder.DecodingException, JsonEncoderDecoder.EncodingException
 
Field Summary
static AbstractJsonEncoderDecoder<BigDecimal> BIG_DECIMAL
           
static AbstractJsonEncoderDecoder<BigInteger> BIG_INTEGER
           
static AbstractJsonEncoderDecoder<Boolean> BOOLEAN
           
static AbstractJsonEncoderDecoder<Byte> BYTE
           
static AbstractJsonEncoderDecoder<Character> CHAR
           
static AbstractJsonEncoderDecoder<Date> DATE
           
static AbstractJsonEncoderDecoder<Document> DOCUMENT
           
static AbstractJsonEncoderDecoder<Double> DOUBLE
           
static AbstractJsonEncoderDecoder<Float> FLOAT
           
static AbstractJsonEncoderDecoder<Integer> INT
           
static AbstractJsonEncoderDecoder<JSONValue> JSON_VALUE
           
static AbstractJsonEncoderDecoder<Long> LONG
           
static AbstractJsonEncoderDecoder<Short> SHORT
           
static AbstractJsonEncoderDecoder<String> STRING
           
 
Constructor Summary
AbstractJsonEncoderDecoder()
           
 
Method Summary
static BigDecimal toBigDecimal(JSONValue value)
           
static double toDouble(JSONValue value)
           
static
<Type> JSONValue
toJSON(Collection<Type> value, AbstractJsonEncoderDecoder<Type> encoder)
           
static
<Type> JSONValue
toJSON(Map<String,Type> value, AbstractJsonEncoderDecoder<Type> encoder, Json.Style style)
           
static
<Type> List<Type>
toList(JSONValue value, AbstractJsonEncoderDecoder<Type> encoder)
           
static
<Type> Map<String,Type>
toMap(JSONValue value, AbstractJsonEncoderDecoder<Type> encoder, Json.Style style)
           
static JSONObject toObject(JSONValue value)
           
static JSONObject toObjectFromWrapper(JSONValue value, String name)
           
static
<Type> Set<Type>
toSet(JSONValue value, AbstractJsonEncoderDecoder<Type> encoder)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.fusesource.restygwt.client.JsonEncoderDecoder
decode, encode
 

Field Detail

BOOLEAN

public static final AbstractJsonEncoderDecoder<Boolean> BOOLEAN

CHAR

public static final AbstractJsonEncoderDecoder<Character> CHAR

BYTE

public static final AbstractJsonEncoderDecoder<Byte> BYTE

SHORT

public static final AbstractJsonEncoderDecoder<Short> SHORT

INT

public static final AbstractJsonEncoderDecoder<Integer> INT

LONG

public static final AbstractJsonEncoderDecoder<Long> LONG

FLOAT

public static final AbstractJsonEncoderDecoder<Float> FLOAT

DOUBLE

public static final AbstractJsonEncoderDecoder<Double> DOUBLE

STRING

public static final AbstractJsonEncoderDecoder<String> STRING

BIG_DECIMAL

public static final AbstractJsonEncoderDecoder<BigDecimal> BIG_DECIMAL

BIG_INTEGER

public static final AbstractJsonEncoderDecoder<BigInteger> BIG_INTEGER

DOCUMENT

public static final AbstractJsonEncoderDecoder<Document> DOCUMENT

JSON_VALUE

public static final AbstractJsonEncoderDecoder<JSONValue> JSON_VALUE

DATE

public static final AbstractJsonEncoderDecoder<Date> DATE
Constructor Detail

AbstractJsonEncoderDecoder

public AbstractJsonEncoderDecoder()
Method Detail

toBigDecimal

public static BigDecimal toBigDecimal(JSONValue value)

toDouble

public static double toDouble(JSONValue value)

toObject

public static JSONObject toObject(JSONValue value)

toObjectFromWrapper

public static JSONObject toObjectFromWrapper(JSONValue value,
                                             String name)

toList

public static <Type> List<Type> toList(JSONValue value,
                                       AbstractJsonEncoderDecoder<Type> encoder)

toSet

public static <Type> Set<Type> toSet(JSONValue value,
                                     AbstractJsonEncoderDecoder<Type> encoder)

toMap

public static <Type> Map<String,Type> toMap(JSONValue value,
                                            AbstractJsonEncoderDecoder<Type> encoder,
                                            Json.Style style)

toJSON

public static <Type> JSONValue toJSON(Map<String,Type> value,
                                      AbstractJsonEncoderDecoder<Type> encoder,
                                      Json.Style style)

toJSON

public static <Type> JSONValue toJSON(Collection<Type> value,
                                      AbstractJsonEncoderDecoder<Type> encoder)


Copyright © 2010-2011 FuseSource, Corp.. All Rights Reserved.