/** * Convenience Method: <br/> * Gets the class data object which contains information about this class, * will retrieve this from the class data cache if available or generate it if not<br/> * This is also available from the {@link ClassFields} object * * @param <T> * @param cls any {@link Class} * @return the class data cache object (contains reflected data from this class) */ public <T> ClassData<T> getClassData(Class<T> cls) { ClassFields<T> cf = getClassFields(cls); return cf.getClassData(); }
/** * Convenience Method: <br/> * Gets the class data object which contains information about this class, * will retrieve this from the class data cache if available or generate it if not<br/> * This is also available from the {@link ClassFields} object * * @param <T> * @param cls any {@link Class} * @return the class data cache object (contains reflected data from this class) */ public <T> ClassData<T> getClassData(Class<T> cls) { ClassFields<T> cf = getClassFields(cls); return cf.getClassData(); }
/** * Convenience Method: <br/> * Gets the class data object which contains information about this objects class, * will retrieve this from the class data cache if available or generate it if not<br/> * This is also available from the {@link ClassFields} object * * @param <T> * @param obj any {@link Object} * @return the raw ClassData cache object which contains reflection data about this objects class * @throws IllegalArgumentException if obj is null */ public <T> ClassData<T> getClassData(Object obj) { ClassFields<T> cf = getClassFieldsFromObject(obj); return cf.getClassData(); }
/** * Convenience Method: <br/> * Gets the class data object which contains information about this objects class, * will retrieve this from the class data cache if available or generate it if not<br/> * This is also available from the {@link ClassFields} object * * @param <T> * @param obj any {@link Object} * @return the raw ClassData cache object which contains reflection data about this objects class * @throws IllegalArgumentException if obj is null */ public <T> ClassData<T> getClassData(Object obj) { ClassFields<T> cf = getClassFieldsFromObject(obj); return cf.getClassData(); }
public Enum convertInterface(Object value, Class<? extends Enum> implementationType) { Enum convert = null; String name = value.toString(); // can only deal with strings // now we try to find the enum field in this enum class ClassFields<Enum> cf = (ClassFields<Enum>) getFieldUtils().analyzeClass(implementationType); List<Enum> enumConstants = cf.getClassData().getEnumConstants(); for (Enum e : enumConstants) { if (e.name().equals(name)) { // found the matching enum convert = e; break; } } if (convert == null) { throw new UnsupportedOperationException("Failure attempting to create enum for name ("+name+") in ("+implementationType+")"); } return convert; }
public Enum convertInterface(Object value, Class<? extends Enum> implementationType) { Enum convert = null; String name = value.toString(); // can only deal with strings // now we try to find the enum field in this enum class ClassFields<Enum> cf = (ClassFields<Enum>) getFieldUtils().analyzeClass(implementationType); List<Enum> enumConstants = cf.getClassData().getEnumConstants(); for (Enum e : enumConstants) { if (e.name().equals(name)) { // found the matching enum convert = e; break; } } if (convert == null) { throw new UnsupportedOperationException("Failure attempting to create enum for name ("+name+") in ("+implementationType+")"); } return convert; }
} catch (FieldnameNotFoundException fnfe) { ClassData<?> cd = cf.getClassData(); Field field = getFieldIfPossible(cd, name); if (field == null) {
} catch (FieldnameNotFoundException fnfe) { ClassData<?> cd = cf.getClassData(); Field field = getFieldIfPossible(cd, name); if (field == null) {
} catch (FieldnameNotFoundException fnfe) { ClassData<?> cd = cf.getClassData(); Field field = getFieldIfPossible(cd, name); if (field == null) {
} catch (FieldnameNotFoundException fnfe) { ClassData<?> cd = cf.getClassData(); Field field = getFieldIfPossible(cd, name); if (field == null) {
} catch (FieldnameNotFoundException fnfe) { ClassData<?> cd = cf.getClassData(); Field field = getFieldIfPossible(cd, name); if (field == null) {
} catch (FieldnameNotFoundException fnfe) { ClassData<?> cd = cf.getClassData(); Field field = getFieldIfPossible(cd, name); if (field == null) {
} catch (FieldnameNotFoundException fnfe) { ClassData<?> cd = cf.getClassData(); Field field = getFieldIfPossible(cd, name); if (field == null) {
} catch (FieldnameNotFoundException fnfe) { ClassData<?> cd = cf.getClassData(); Field field = getFieldIfPossible(cd, name); if (field == null) {