/** * Set the option to include the "class" field when reflecting over objects, * the default for this is false (do not include) * @param includeClassField if true then include the value from the "getClass()" method as "class" when encoding beans and maps */ public void setIncludeClassField(boolean includeClassField) { getClassDataCacher().setIncludeClassField(includeClassField); }
/** * Set the cache to be used for holding the reflection data, * this allows control over where the reflection caches are stored, * this should store the data in a way that it will not hold open the classloader the class comes from <br/> * Note that you can set this to a map implementation which does not store anything to disable caching if you like * * @param reflectionCache a cache for holding class cache data (implements map), null to use the default internal cache */ @SuppressWarnings("unchecked") public void setReflectionCache(Map<Class<?>, ClassFields> reflectionCache) { getClassDataCacher().setReflectionCache(reflectionCache); }
/** * Set the option to include the "class" field when reflecting over objects, * the default for this is false (do not include) * @param includeClassField if true then include the value from the "getClass()" method as "class" when encoding beans and maps */ public void setIncludeClassField(boolean includeClassField) { getClassDataCacher().setIncludeClassField(includeClassField); }
/** * 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); }
/** * Set the cache to be used for holding the reflection data, * this allows control over where the reflection caches are stored, * this should store the data in a way that it will not hold open the classloader the class comes from <br/> * Note that you can set this to a map implementation which does not store anything to disable caching if you like * * @param reflectionCache a cache for holding class cache data (implements map), null to use the default internal cache */ @SuppressWarnings("unchecked") public void setReflectionCache(Map<Class<?>, ClassFields> reflectionCache) { getClassDataCacher().setReflectionCache(reflectionCache); }
@Override public String toString() { return "Reflect::c="+ReflectUtils.timesCreated+":s="+singleton+":" + getClassDataCacher() + ":" + getFieldUtils() + ":" + getConversionUtils(); }
@Override public String toString() { return "Reflect::c="+ReflectUtils.timesCreated+":s="+singleton+":" + getClassDataCacher() + ":" + getFieldUtils() + ":" + getConversionUtils(); }