Package com.ibatis.common.beans
Class ClassInfo
java.lang.Object
com.ibatis.common.beans.ClassInfo
This class represents a cached set of class definition information that allows for easy mapping between property
names and getter/setter methods.
-
Method Summary
Modifier and TypeMethodDescriptionGets the name of the class the instance provides information for.getGetInvoker
(String propertyName) Gets the gets the invoker.Gets the getter for a property as a Method object.getGetterType
(String propertyName) Gets the type for a property getter.static ClassInfo
getInstance
(Class clazz) Gets an instance of ClassInfo for the specified class.String[]
Gets an array of the readable properties for an object.getSetInvoker
(String propertyName) Gets the sets the invoker.Gets the setter for a property as a Method object.getSetterType
(String propertyName) Gets the type for a property setter.String[]
Gets an array of the writeable properties for an object.boolean
hasReadableProperty
(String propertyName) Check to see if a class has a readable property by name.boolean
hasWritableProperty
(String propertyName) Check to see if a class has a writeable property by name.Instantiate class.static boolean
isKnownType
(Class clazz) Tells us if the class passed in is a knwon common type.static void
setCacheEnabled
(boolean cacheEnabled) Sets the cache enabled.static Throwable
Examines a Throwable object and gets it's root cause.
-
Method Details
-
getClassName
Gets the name of the class the instance provides information for.- Returns:
- The class name
-
instantiateClass
-
getSetter
-
getGetter
-
getSetInvoker
-
getGetInvoker
-
getSetterType
-
getGetterType
-
getReadablePropertyNames
Gets an array of the readable properties for an object.- Returns:
- The array
-
getWriteablePropertyNames
Gets an array of the writeable properties for an object.- Returns:
- The array
-
hasWritableProperty
Check to see if a class has a writeable property by name.- Parameters:
propertyName
- - the name of the property to check- Returns:
- True if the object has a writeable property by the name
-
hasReadableProperty
Check to see if a class has a readable property by name.- Parameters:
propertyName
- - the name of the property to check- Returns:
- True if the object has a readable property by the name
-
isKnownType
Tells us if the class passed in is a knwon common type.- Parameters:
clazz
- The class to check- Returns:
- True if the class is known
-
getInstance
-
setCacheEnabled
public static void setCacheEnabled(boolean cacheEnabled) Sets the cache enabled.- Parameters:
cacheEnabled
- the new cache enabled
-
unwrapThrowable
-