cc.plural.jsonij.marshal
Class JavaObjectMarshaler

java.lang.Object
  extended by cc.plural.jsonij.marshal.JavaObjectMarshaler

public class JavaObjectMarshaler
extends Object

Author:
jmarsden

Field Summary
protected  Map<Class<?>,Inspector> inspectedClasses
           
protected  JavaMarshaler marshaler
           
 
Constructor Summary
JavaObjectMarshaler(JavaMarshaler marshaler)
           
 
Method Summary
static JSONCodec<?> getCodec(Class<?> codecType)
           
static int getCycleLevels()
           
static boolean hasCodec(Class<?> codecType)
           
 boolean isObjectType(Class<?> objectClass)
           
 Value marshalJavaObject(Object o, JavaMarshaler.CycleDetector cycleDetector)
           
protected  Value marshalObjectFieldValue(Field field, Object o, JavaMarshaler.CycleDetector cycleDetector)
           
protected  Value marshalObjectMethodValue(Method method, Object o, JavaMarshaler.CycleDetector cycleDetector)
           
static void registerCodec(Class<?> codecClass)
           
static void setCycleLevels(int levels)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

marshaler

protected JavaMarshaler marshaler

inspectedClasses

protected final Map<Class<?>,Inspector> inspectedClasses
Constructor Detail

JavaObjectMarshaler

public JavaObjectMarshaler(JavaMarshaler marshaler)
Method Detail

isObjectType

public boolean isObjectType(Class<?> objectClass)

marshalJavaObject

public Value marshalJavaObject(Object o,
                               JavaMarshaler.CycleDetector cycleDetector)

marshalObjectMethodValue

protected Value marshalObjectMethodValue(Method method,
                                         Object o,
                                         JavaMarshaler.CycleDetector cycleDetector)
                                  throws IllegalAccessException,
                                         IllegalArgumentException,
                                         InvocationTargetException
Throws:
IllegalAccessException
IllegalArgumentException
InvocationTargetException

marshalObjectFieldValue

protected Value marshalObjectFieldValue(Field field,
                                        Object o,
                                        JavaMarshaler.CycleDetector cycleDetector)
                                 throws IllegalArgumentException,
                                        IllegalAccessException
Throws:
IllegalArgumentException
IllegalAccessException

hasCodec

public static boolean hasCodec(Class<?> codecType)

registerCodec

public static void registerCodec(Class<?> codecClass)

getCodec

public static JSONCodec<?> getCodec(Class<?> codecType)

getCycleLevels

public static int getCycleLevels()

setCycleLevels

public static void setCycleLevels(int levels)


Copyright © 2012. All Rights Reserved.