|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ibatis.reflection.Reflector
public class Reflector
This class represents a cached set of class definition information that allows for easy mapping between property names and getter/setter methods.
Method Summary | |
---|---|
java.lang.String |
findPropertyName(java.lang.String name)
|
static Reflector |
forClass(java.lang.Class clazz)
Gets an instance of ClassInfo for the specified class. |
java.lang.reflect.Constructor |
getDefaultConstructor()
|
java.lang.String[] |
getGetablePropertyNames()
Gets an array of the readable properties for an object |
Invoker |
getGetInvoker(java.lang.String propertyName)
|
java.lang.Class |
getGetterType(java.lang.String propertyName)
Gets the type for a property getter |
java.lang.String[] |
getSetablePropertyNames()
Gets an array of the writeable properties for an object |
Invoker |
getSetInvoker(java.lang.String propertyName)
|
java.lang.Class |
getSetterType(java.lang.String propertyName)
Gets the type for a property setter |
java.lang.Class |
getType()
Gets the name of the class the instance provides information for |
boolean |
hasGetter(java.lang.String propertyName)
Check to see if a class has a readable property by name |
boolean |
hasSetter(java.lang.String propertyName)
Check to see if a class has a writeable property by name |
static boolean |
isClassCacheEnabled()
|
static void |
setClassCacheEnabled(boolean classCacheEnabled)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.lang.Class getType()
public java.lang.reflect.Constructor getDefaultConstructor()
public Invoker getSetInvoker(java.lang.String propertyName)
public Invoker getGetInvoker(java.lang.String propertyName)
public java.lang.Class getSetterType(java.lang.String propertyName)
propertyName
- - the name of the property
public java.lang.Class getGetterType(java.lang.String propertyName)
propertyName
- - the name of the property
public java.lang.String[] getGetablePropertyNames()
public java.lang.String[] getSetablePropertyNames()
public boolean hasSetter(java.lang.String propertyName)
propertyName
- - the name of the property to check
public boolean hasGetter(java.lang.String propertyName)
propertyName
- - the name of the property to check
public java.lang.String findPropertyName(java.lang.String name)
public static Reflector forClass(java.lang.Class clazz)
clazz
- The class for which to lookup the method cache.
public static void setClassCacheEnabled(boolean classCacheEnabled)
public static boolean isClassCacheEnabled()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |