thinkmap.server.json
Class Field

java.lang.Object
  extended by thinkmap.server.json.Field

public class Field
extends Object


Field Summary
static Object[] NULL_ARGS
           
 
Method Summary
 boolean canGet()
           
 boolean canSet()
           
static Object coerce(Object oValue, Class<?> c)
           
protected static Object coerceArray(Object toConvert, Class<?> componentType)
           
 Object get(Object target)
           
 Object get(Object target, int index)
           
<T extends Annotation>
T
getAnnotation(Class<T> c)
           
protected  int getBestSetter(Object value)
           
 Class<?> getComponentType()
           
 Type getGenericType()
           
 Method getGetter()
           
 String getName()
           
protected static int getScore(Object value, Class<?> type)
           
 Class getType()
           
 boolean hasAnnotation(Class<? extends Annotation> c)
           
 boolean isArrayType()
           
 boolean isIndexed()
           
 void set(Object target, int index, Object value)
           
 void set(Object target, Object value)
           
protected static boolean toBoolean(Object v)
           
protected static int toInt32(Object v)
           
protected static double toNumber(Object v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_ARGS

public static final Object[] NULL_ARGS
Method Detail

getName

public String getName()

hasAnnotation

public boolean hasAnnotation(Class<? extends Annotation> c)

getAnnotation

public <T extends Annotation> T getAnnotation(Class<T> c)

getGetter

public Method getGetter()

getType

public Class getType()

getGenericType

public Type getGenericType()

canSet

public boolean canSet()

canGet

public boolean canGet()

isArrayType

public boolean isArrayType()

isIndexed

public boolean isIndexed()

getComponentType

public Class<?> getComponentType()

set

public void set(Object target,
                Object value)
         throws Exception
Throws:
Exception

coerceArray

protected static Object coerceArray(Object toConvert,
                                    Class<?> componentType)
                             throws Exception
Throws:
Exception

coerce

public static Object coerce(Object oValue,
                            Class<?> c)
                     throws Exception
Throws:
Exception

toInt32

protected static int toInt32(Object v)

toNumber

protected static double toNumber(Object v)

toBoolean

protected static boolean toBoolean(Object v)

get

public Object get(Object target)
           throws Exception
Throws:
Exception

get

public Object get(Object target,
                  int index)
           throws Exception
Throws:
Exception

set

public void set(Object target,
                int index,
                Object value)
         throws Exception
Throws:
Exception

getBestSetter

protected int getBestSetter(Object value)

getScore

protected static int getScore(Object value,
                              Class<?> type)


Copyright © 2013 Thinkmap, Inc. All Rights Reserved.