com.ibatis.common.beans
Class ClassInfo

java.lang.Object
  extended bycom.ibatis.common.beans.ClassInfo

public class ClassInfo
extends java.lang.Object

This class represents a cached set of class definition information that allows for easy mapping between property names and getter/setter methods.


Field Summary
private static java.util.Map classInfoMap
           
private  java.lang.String className
           
private static java.lang.String[] EMPTY_STRING_ARRAY
           
private  java.util.HashMap getMethods
           
private  java.util.HashMap getTypes
           
private  java.util.HashMap metaClassMap
           
private  java.lang.String[] readablePropertyNames
           
private  java.util.HashMap setMethods
           
private  java.util.HashMap setTypes
           
private static java.util.Set simpleTypeSet
           
private  java.lang.String[] writeablePropertyNames
           
 
Constructor Summary
private ClassInfo(java.lang.Class clazz)
           
 
Method Summary
private  void addMethods(java.lang.Class cls)
           
 java.lang.String getClassName()
           
 java.lang.reflect.Method getGetter(java.lang.String propertyName)
           
 java.lang.Class getGetterType(java.lang.String propertyName)
           
static ClassInfo getInstance(java.lang.Class clazz)
          Gets an instance of ClassInfo for the specified class.
 java.lang.String[] getReadablePropertyNames()
           
 java.lang.reflect.Method getSetter(java.lang.String propertyName)
           
 java.lang.Class getSetterType(java.lang.String propertyName)
           
 java.lang.String[] getWriteablePropertyNames()
           
 boolean hasReadableProperty(java.lang.String propertyName)
           
 boolean hasWritableProperty(java.lang.String propertyName)
           
static boolean isSimpleType(java.lang.Class clazz)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_STRING_ARRAY

private static final java.lang.String[] EMPTY_STRING_ARRAY

simpleTypeSet

private static final java.util.Set simpleTypeSet

classInfoMap

private static final java.util.Map classInfoMap

className

private java.lang.String className

readablePropertyNames

private java.lang.String[] readablePropertyNames

writeablePropertyNames

private java.lang.String[] writeablePropertyNames

setMethods

private java.util.HashMap setMethods

getMethods

private java.util.HashMap getMethods

setTypes

private java.util.HashMap setTypes

getTypes

private java.util.HashMap getTypes

metaClassMap

private java.util.HashMap metaClassMap
Constructor Detail

ClassInfo

private ClassInfo(java.lang.Class clazz)
Method Detail

addMethods

private void addMethods(java.lang.Class cls)

getClassName

public java.lang.String getClassName()

getSetter

public java.lang.reflect.Method getSetter(java.lang.String propertyName)

getGetter

public java.lang.reflect.Method getGetter(java.lang.String propertyName)

getSetterType

public java.lang.Class getSetterType(java.lang.String propertyName)

getGetterType

public java.lang.Class getGetterType(java.lang.String propertyName)

getReadablePropertyNames

public java.lang.String[] getReadablePropertyNames()

getWriteablePropertyNames

public java.lang.String[] getWriteablePropertyNames()

hasWritableProperty

public boolean hasWritableProperty(java.lang.String propertyName)

hasReadableProperty

public boolean hasReadableProperty(java.lang.String propertyName)

isSimpleType

public static boolean isSimpleType(java.lang.Class clazz)

getInstance

public static ClassInfo getInstance(java.lang.Class clazz)
Gets an instance of ClassInfo for the specified class.

Parameters:
clazz - The class for which to lookup the method cache.
Returns:
The method cache for the class