public static final class BeansWrapper.MethodAppearanceDecision
extends java.lang.Object
MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)
to store the results; see there.| Constructor and Description |
|---|
MethodAppearanceDecision() |
| Modifier and Type | Method and Description |
|---|---|
java.beans.PropertyDescriptor |
getExposeAsProperty()
|
java.lang.String |
getExposeMethodAs()
|
boolean |
getMethodShadowsProperty()
|
boolean |
getReplaceExistingProperty()
Getter pair of
setReplaceExistingProperty(boolean). |
void |
setExposeAsProperty(java.beans.PropertyDescriptor exposeAsProperty)
|
void |
setExposeMethodAs(java.lang.String exposeAsMethod)
|
void |
setMethodShadowsProperty(boolean shadowEarlierProperty)
|
void |
setReplaceExistingProperty(boolean overrideExistingProperty)
If
getExposeAsProperty() is non-null, and a PropertyDescriptor with the same
property name was already added to the class introspection data, this decides if that will be replaced
with the PropertyDescriptor returned by getExposeAsProperty(). |
public java.beans.PropertyDescriptor getExposeAsProperty()
public void setExposeAsProperty(java.beans.PropertyDescriptor exposeAsProperty)
MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision).
Note that you may also want to call
setMethodShadowsProperty(false) when you call this.public boolean getReplaceExistingProperty()
setReplaceExistingProperty(boolean).public void setReplaceExistingProperty(boolean overrideExistingProperty)
getExposeAsProperty() is non-null, and a PropertyDescriptor with the same
property name was already added to the class introspection data, this decides if that will be replaced
with the PropertyDescriptor returned by getExposeAsProperty(). The default is false,
that is, the old PropertyDescriptor is kept, and the new one is ignored.
JavaBean properties discovered with the standard (non-MethodAppearanceFineTuner) mechanism
are added before those created by the MethodAppearanceFineTuner, so with this you can decide if a
real JavaBeans property can be replaced by the "fake" one created with
setExposeAsProperty(PropertyDescriptor).public java.lang.String getExposeMethodAs()
public void setExposeMethodAs(java.lang.String exposeAsMethod)
public boolean getMethodShadowsProperty()
public void setMethodShadowsProperty(boolean shadowEarlierProperty)