|
||||||||||
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 | |
---|---|
String |
findPropertyName(String name)
|
static Reflector |
forClass(Class<?> clazz)
Gets an instance of ClassInfo for the specified class. |
Constructor<?> |
getDefaultConstructor()
|
String[] |
getGetablePropertyNames()
Gets an array of the readable properties for an object |
Invoker |
getGetInvoker(String propertyName)
|
Class<?> |
getGetterType(String propertyName)
Gets the type for a property getter |
String[] |
getSetablePropertyNames()
Gets an array of the writeable properties for an object |
Invoker |
getSetInvoker(String propertyName)
|
Class<?> |
getSetterType(String propertyName)
Gets the type for a property setter |
Class<?> |
getType()
Gets the name of the class the instance provides information for |
boolean |
hasGetter(String propertyName)
Check to see if a class has a readable property by name |
boolean |
hasSetter(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 Class<?> getType()
public Constructor<?> getDefaultConstructor()
public Invoker getSetInvoker(String propertyName)
public Invoker getGetInvoker(String propertyName)
public Class<?> getSetterType(String propertyName)
propertyName
- - the name of the property
public Class<?> getGetterType(String propertyName)
propertyName
- - the name of the property
public String[] getGetablePropertyNames()
public String[] getSetablePropertyNames()
public boolean hasSetter(String propertyName)
propertyName
- - the name of the property to check
public boolean hasGetter(String propertyName)
propertyName
- - the name of the property to check
public String findPropertyName(String name)
public static Reflector forClass(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 |