public abstract class BeansWrapperConfiguration
extends java.lang.Object
implements java.lang.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 | Constructor and Description |
---|---|
protected |
BeansWrapperConfiguration(Version incompatibleImprovements)
|
protected |
BeansWrapperConfiguration(Version incompatibleImprovements,
boolean isIncompImprsAlreadyNormalized) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
clone(boolean deepCloneKey) |
boolean |
equals(java.lang.Object obj)
Two
BeansWrapperConfiguration -s are equal exactly if their classes are identical (== ), and their
field values are equal. |
int |
getDefaultDateType() |
boolean |
getExposeFields() |
int |
getExposureLevel() |
Version |
getIncompatibleImprovements() |
MemberAccessPolicy |
getMemberAccessPolicy() |
MethodAppearanceFineTuner |
getMethodAppearanceFineTuner() |
ObjectWrapper |
getOuterIdentity() |
boolean |
getPreferIndexedReadMethod() |
boolean |
getTreatDefaultMethodsAsBeanMembers() |
boolean |
getUseModelCache() |
int |
hashCode() |
boolean |
isSimpleMapWrapper() |
boolean |
isStrict() |
void |
setDefaultDateType(int defaultDateType)
|
void |
setExposeFields(boolean exposeFields)
|
void |
setExposureLevel(int exposureLevel)
|
void |
setMemberAccessPolicy(MemberAccessPolicy memberAccessPolicy)
|
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 |
setPreferIndexedReadMethod(boolean preferIndexedReadMethod)
|
void |
setSimpleMapWrapper(boolean simpleMapWrapper)
|
void |
setStrict(boolean strict)
|
void |
setTreatDefaultMethodsAsBeanMembers(boolean treatDefaultMethodsAsBeanMembers)
|
void |
setUseModelCache(boolean useModelCache)
See
BeansWrapper.setUseCache(boolean) (it means the same). |
protected BeansWrapperConfiguration(Version incompatibleImprovements, boolean isIncompImprsAlreadyNormalized)
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 return a lower version than what you have specified
here.isIncompImprsAlreadyNormalized
- Tells if the incompatibleImprovements
parameter contains an already normalized value.
This parameter meant to be true
when the class that extends BeansWrapper
needs to add
additional breaking versions over those of BeansWrapper
. Thus, if this parameter is
true
, the versions where BeansWrapper
had breaking changes must be already factored
into the incompatibleImprovements
parameter value, as no more normalization will happen. (You
can use BeansWrapper.normalizeIncompatibleImprovementsVersion(Version)
to discover those.)protected BeansWrapperConfiguration(Version incompatibleImprovements)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
BeansWrapperConfiguration
-s are equal exactly if their classes are identical (==
), and their
field values are equal.equals
in class java.lang.Object
protected java.lang.Object clone(boolean deepCloneKey)
public boolean isSimpleMapWrapper()
public void setSimpleMapWrapper(boolean simpleMapWrapper)
public boolean getPreferIndexedReadMethod()
public void setPreferIndexedReadMethod(boolean preferIndexedReadMethod)
BeansWrapper.setPreferIndexedReadMethod(boolean)
. @since 2.3.27public 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 MemberAccessPolicy getMemberAccessPolicy()
public void setMemberAccessPolicy(MemberAccessPolicy memberAccessPolicy)
public boolean getTreatDefaultMethodsAsBeanMembers()
public void setTreatDefaultMethodsAsBeanMembers(boolean treatDefaultMethodsAsBeanMembers)
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
.