public static boolean isPropertyOfType ( Class < ? > clazz , String propertyName , Class < ? > type ) { try { Class < ? > propType = getPropertyType ( clazz , propertyName ) ; return propType != null && propType . equals ( type ) ; } catch ( Exception e ) { return false ; } }
Returns true if the specified property in the specified class is of the specified type