public static Class getPropertyType ( Object object , String propertyName ) { Method readMethod = getReadMethod ( object , propertyName ) ; if ( readMethod == null ) { return null ; } return readMethod . getReturnType ( ) ; }
Tried to determine the appropriate reader method for a given propertyName of a given object and if found returns the class of its return type .