/** * Set the mode used to find fields on classes (default {@link FieldFindMode#HYBRID}) <br/> * <b>WARNING</b>: changing modes will clear the existing cache * * @param fieldFindMode see {@link FieldFindMode} enum for details, null for default * @see FieldFindMode */ public void setFieldFindMode(FieldFindMode fieldFindMode) { getClassDataCacher().setFieldFindMode(fieldFindMode); }
/** * Set the mode used to find fields on classes (default {@link FieldFindMode#HYBRID}) <br/> * <b>WARNING</b>: changing modes will clear the existing cache * * @param fieldFindMode see {@link FieldFindMode} enum for details, null for default * @see FieldFindMode */ public void setFieldFindMode(FieldFindMode fieldFindMode) { getClassDataCacher().setFieldFindMode(fieldFindMode); }
/** * Construct and specify the field finding mode and your own cache when caching class data, must implement the standard map interface but * only the following methods are required:<br/> * {@link Map#clear()}, {@link Map#size()}, {@link Map#put(Object, Object)}, {@link Map#get(Object)} <br/> * <br/> * <b>WARNING:</b> if you don't need this control then just use the {@link #getInstance()} method to get this * * @param fieldFindMode the mode when looking up fields in classes (null for default of {@link FieldFindMode#HYBRID}) * @param reflectionCache a map implementation to use as the cache mechanism (null to use internal) */ @SuppressWarnings("unchecked") public ClassDataCacher(FieldFindMode fieldFindMode, Map<Class<?>, ClassFields> reflectionCache) { setFieldFindMode(fieldFindMode); setReflectionCache(reflectionCache); ClassDataCacher.setInstance(this); }
/** * Construct and specify the field finding mode and your own cache when caching class data, must implement the standard map interface but * only the following methods are required:<br/> * {@link Map#clear()}, {@link Map#size()}, {@link Map#put(Object, Object)}, {@link Map#get(Object)} <br/> * <br/> * <b>WARNING:</b> if you don't need this control then just use the {@link #getInstance()} method to get this * * @param fieldFindMode the mode when looking up fields in classes (null for default of {@link FieldFindMode#HYBRID}) * @param reflectionCache a map implementation to use as the cache mechanism (null to use internal) */ @SuppressWarnings("unchecked") public ClassDataCacher(FieldFindMode fieldFindMode, Map<Class<?>, ClassFields> reflectionCache) { setFieldFindMode(fieldFindMode); setReflectionCache(reflectionCache); ClassDataCacher.setInstance(this); }