public abstract class BeansWrapperConfiguration extends Object implements Cloneable
BeansWrapper configuration settings and defines their defaults.
You will not use this abstract class directly, but concrete subclasses like BeansWrapperBuilder and
DefaultObjectWrapperBuilder. Unless, you are developing a builder for a custom BeansWrapper subclass.
This class is designed so that its instances can be used as lookup keys in a singleton cache. This is also why
this class defines the configuration setting defaults for BeansWrapper, instead of leaving that to
BeansWrapper itself. (Because, the default values influence the lookup key, and the singleton needs to be
looked up without creating a BeansWrapper instance.) However, because instances are mutable, you should
deep-clone it with clone(boolean) before using it as cache key.
| Modifier and Type | Field and Description |
|---|---|
protected freemarker.ext.beans.ClassIntrospectorBuilder |
classIntrospectorFactory |
| Modifier | Constructor and Description |
|---|---|
protected |
BeansWrapperConfiguration(Version incompatibleImprovements) |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
clone(boolean deepCloneKey) |
boolean |
equals(Object obj) |
int |
getDefaultDateType() |
boolean |
getExposeFields() |
int |
getExposureLevel() |
Version |
getIncompatibleImprovements() |
MethodAppearanceFineTuner |
getMethodAppearanceFineTuner() |
ObjectWrapper |
getOuterIdentity() |
boolean |
getUseModelCache() |
int |
hashCode() |
boolean |
isSimpleMapWrapper() |
boolean |
isStrict() |
void |
setDefaultDateType(int defaultDateType)
|
void |
setExposeFields(boolean exposeFields)
|
void |
setExposureLevel(int exposureLevel)
|
void |
setMethodAppearanceFineTuner(MethodAppearanceFineTuner methodAppearanceFineTuner)
See
BeansWrapper.setMethodAppearanceFineTuner(MethodAppearanceFineTuner); additionally,
note that currently setting this to non-null will disable class introspection cache sharing, unless
the value implements SingletonCustomizer. |
void |
setOuterIdentity(ObjectWrapper outerIdentity)
See
BeansWrapper.setOuterIdentity(ObjectWrapper), except here the default is null that means
the ObjectWrapper that you will set up with this BeansWrapperBuilder object. |
void |
setSimpleMapWrapper(boolean simpleMapWrapper)
|
void |
setStrict(boolean strict)
|
void |
setUseModelCache(boolean useModelCache)
See
BeansWrapper.setUseCache(boolean) (it means the same). |
protected freemarker.ext.beans.ClassIntrospectorBuilder classIntrospectorFactory
protected BeansWrapperConfiguration(Version incompatibleImprovements)
incompatibleImprovements - See the corresponding parameter of BeansWrapper.BeansWrapper(Version).
Not null.
Note that the version will be normalized to the lowest version where the same incompatible
BeansWrapper improvements were already present, so for the returned instance
getIncompatibleImprovements() might returns a lower version than what you have specified.protected Object clone(boolean deepCloneKey)
public boolean isSimpleMapWrapper()
public void setSimpleMapWrapper(boolean simpleMapWrapper)
public int getDefaultDateType()
public void setDefaultDateType(int defaultDateType)
public ObjectWrapper getOuterIdentity()
public void setOuterIdentity(ObjectWrapper outerIdentity)
BeansWrapper.setOuterIdentity(ObjectWrapper), except here the default is null that means
the ObjectWrapper that you will set up with this BeansWrapperBuilder object.public boolean isStrict()
public void setStrict(boolean strict)
public boolean getUseModelCache()
public void setUseModelCache(boolean useModelCache)
BeansWrapper.setUseCache(boolean) (it means the same).public Version getIncompatibleImprovements()
public int getExposureLevel()
public void setExposureLevel(int exposureLevel)
public boolean getExposeFields()
public void setExposeFields(boolean exposeFields)
public MethodAppearanceFineTuner getMethodAppearanceFineTuner()
public void setMethodAppearanceFineTuner(MethodAppearanceFineTuner methodAppearanceFineTuner)
BeansWrapper.setMethodAppearanceFineTuner(MethodAppearanceFineTuner); additionally,
note that currently setting this to non-null will disable class introspection cache sharing, unless
the value implements SingletonCustomizer.