thinkmap.server.json
Class Field
java.lang.Object
thinkmap.server.json.Field
public class Field
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NULL_ARGS
public static final Object[] NULL_ARGS
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.