Class BeansWrapperConfiguration
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
BeansWrapperBuilder
,DefaultObjectWrapperConfiguration
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.
- Since:
- 2.3.21
-
Constructor Summary
ModifierConstructorDescriptionprotected
BeansWrapperConfiguration(Version incompatibleImprovements)
protected
BeansWrapperConfiguration(Version incompatibleImprovements, boolean isIncompImprsAlreadyNormalized)
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
clone(boolean deepCloneKey)
boolean
TwoBeansWrapperConfiguration
-s are equal exactly if their classes are identical (==
), and their field values are equal.int
boolean
int
boolean
boolean
boolean
int
hashCode()
boolean
boolean
isStrict()
void
setDefaultDateType(int defaultDateType)
void
setDefaultZeroArgumentNonVoidMethodPolicy(ZeroArgumentNonVoidMethodPolicy defaultZeroArgumentNonVoidMethodPolicy)
void
setExposeFields(boolean exposeFields)
void
setExposureLevel(int exposureLevel)
void
setMemberAccessPolicy(MemberAccessPolicy memberAccessPolicy)
void
setMethodAppearanceFineTuner(MethodAppearanceFineTuner methodAppearanceFineTuner)
SeeBeansWrapper.setMethodAppearanceFineTuner(MethodAppearanceFineTuner)
; additionally, note that currently setting this to non-null
will disable class introspection cache sharing, unless the value implementsSingletonCustomizer
.void
setOuterIdentity(ObjectWrapper outerIdentity)
SeeBeansWrapper.setOuterIdentity(ObjectWrapper)
, except here the default isnull
that means theObjectWrapper
that you will set up with thisBeansWrapperBuilder
object.void
setPreferIndexedReadMethod(boolean preferIndexedReadMethod)
void
setRecordZeroArgumentNonVoidMethodPolicy(ZeroArgumentNonVoidMethodPolicy recordZeroArgumentNonVoidMethodPolicy)
void
setSimpleMapWrapper(boolean simpleMapWrapper)
void
setStrict(boolean strict)
void
setTreatDefaultMethodsAsBeanMembers(boolean treatDefaultMethodsAsBeanMembers)
void
setUseModelCache(boolean useModelCache)
SeeBeansWrapper.setUseCache(boolean)
(it means the same).
-
Constructor Details
-
BeansWrapperConfiguration
protected BeansWrapperConfiguration(Version incompatibleImprovements, boolean isIncompImprsAlreadyNormalized)- Parameters:
incompatibleImprovements
- See the corresponding parameter ofBeansWrapper(Version)
. Notnull
. Note that the version will be normalized to the lowest version where the same incompatibleBeansWrapper
improvements were already present, so for the returned instancegetIncompatibleImprovements()
might return a lower version than what you have specified here.isIncompImprsAlreadyNormalized
- Tells if theincompatibleImprovements
parameter contains an already normalized value. This parameter meant to betrue
when the class that extendsBeansWrapper
needs to add additional breaking versions over those ofBeansWrapper
. Thus, if this parameter istrue
, the versions whereBeansWrapper
had breaking changes must be already factored into theincompatibleImprovements
parameter value, as no more normalization will happen. (You can useBeansWrapper.normalizeIncompatibleImprovementsVersion(Version)
to discover those.)- Since:
- 2.3.22
-
BeansWrapperConfiguration
-
-
Method Details
-
hashCode
public int hashCode() -
equals
TwoBeansWrapperConfiguration
-s are equal exactly if their classes are identical (==
), and their field values are equal. -
clone
-
isSimpleMapWrapper
public boolean isSimpleMapWrapper() -
setSimpleMapWrapper
public void setSimpleMapWrapper(boolean simpleMapWrapper) -
getPreferIndexedReadMethod
public boolean getPreferIndexedReadMethod()- Since:
- 2.3.27
-
setPreferIndexedReadMethod
public void setPreferIndexedReadMethod(boolean preferIndexedReadMethod)SeeBeansWrapper.setPreferIndexedReadMethod(boolean)
. @since 2.3.27 -
getDefaultDateType
public int getDefaultDateType() -
setDefaultDateType
public void setDefaultDateType(int defaultDateType) -
getOuterIdentity
-
setOuterIdentity
SeeBeansWrapper.setOuterIdentity(ObjectWrapper)
, except here the default isnull
that means theObjectWrapper
that you will set up with thisBeansWrapperBuilder
object. -
isStrict
public boolean isStrict() -
setStrict
public void setStrict(boolean strict) -
getUseModelCache
public boolean getUseModelCache() -
setUseModelCache
public void setUseModelCache(boolean useModelCache)SeeBeansWrapper.setUseCache(boolean)
(it means the same). -
getIncompatibleImprovements
-
getExposureLevel
public int getExposureLevel() -
setExposureLevel
public void setExposureLevel(int exposureLevel) -
getExposeFields
public boolean getExposeFields() -
setExposeFields
public void setExposeFields(boolean exposeFields) -
getMemberAccessPolicy
-
setMemberAccessPolicy
-
getTreatDefaultMethodsAsBeanMembers
public boolean getTreatDefaultMethodsAsBeanMembers() -
setTreatDefaultMethodsAsBeanMembers
public void setTreatDefaultMethodsAsBeanMembers(boolean treatDefaultMethodsAsBeanMembers) -
getDefaultZeroArgumentNonVoidMethodPolicy
Getter pair ofsetDefaultZeroArgumentNonVoidMethodPolicy(freemarker.ext.beans.ZeroArgumentNonVoidMethodPolicy)
.- Since:
- 2.3.33
-
setDefaultZeroArgumentNonVoidMethodPolicy
public void setDefaultZeroArgumentNonVoidMethodPolicy(ZeroArgumentNonVoidMethodPolicy defaultZeroArgumentNonVoidMethodPolicy)SeeBeansWrapper.setDefaultZeroArgumentNonVoidMethodPolicy(ZeroArgumentNonVoidMethodPolicy)
.Note that methods in this class are inherited by
DefaultObjectWrapperBuilder
, which is what you normally use.- Since:
- 2.3.33
-
getRecordZeroArgumentNonVoidMethodPolicy
Getter pair ofsetRecordZeroArgumentNonVoidMethodPolicy(freemarker.ext.beans.ZeroArgumentNonVoidMethodPolicy)
.- Since:
- 2.3.33
-
setRecordZeroArgumentNonVoidMethodPolicy
public void setRecordZeroArgumentNonVoidMethodPolicy(ZeroArgumentNonVoidMethodPolicy recordZeroArgumentNonVoidMethodPolicy)SeeBeansWrapper.setRecordZeroArgumentNonVoidMethodPolicy(ZeroArgumentNonVoidMethodPolicy)
Note that methods in this class are inherited by
DefaultObjectWrapperBuilder
, which is what you normally use.- Since:
- 2.3.33
-
getMethodAppearanceFineTuner
-
setMethodAppearanceFineTuner
SeeBeansWrapper.setMethodAppearanceFineTuner(MethodAppearanceFineTuner)
; additionally, note that currently setting this to non-null
will disable class introspection cache sharing, unless the value implementsSingletonCustomizer
.Note that methods in this class are inherited by
DefaultObjectWrapperBuilder
, which is what you normally use.
-