Package freemarker.ext.beans
Class BeansWrapper.MethodAppearanceDecision
- java.lang.Object
-
- freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision
-
- Enclosing class:
- BeansWrapper
public static final class BeansWrapper.MethodAppearanceDecision extends java.lang.ObjectUsed forMethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)to store the results; see there.
-
-
Constructor Summary
Constructors Constructor Description MethodAppearanceDecision()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.beans.PropertyDescriptorgetExposeAsProperty()java.lang.StringgetExposeMethodAs()booleangetMethodShadowsProperty()booleangetReplaceExistingProperty()Getter pair ofsetReplaceExistingProperty(boolean).voidsetExposeAsProperty(java.beans.PropertyDescriptor exposeAsProperty)voidsetExposeMethodAs(java.lang.String exposeAsMethod)voidsetMethodShadowsProperty(boolean shadowEarlierProperty)voidsetReplaceExistingProperty(boolean overrideExistingProperty)IfgetExposeAsProperty()is non-null, and aPropertyDescriptorwith the same property name was already added to the class introspection data, this decides if that will be replaced with thePropertyDescriptorreturned bygetExposeAsProperty().
-
-
-
Method Detail
-
getExposeAsProperty
public java.beans.PropertyDescriptor getExposeAsProperty()
-
setExposeAsProperty
public void setExposeAsProperty(java.beans.PropertyDescriptor exposeAsProperty)
See in the documentation ofMethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision). Note that you may also want to callsetMethodShadowsProperty(false)when you call this.
-
getReplaceExistingProperty
public boolean getReplaceExistingProperty()
Getter pair ofsetReplaceExistingProperty(boolean).- Since:
- 2.3.28
-
setReplaceExistingProperty
public void setReplaceExistingProperty(boolean overrideExistingProperty)
IfgetExposeAsProperty()is non-null, and aPropertyDescriptorwith the same property name was already added to the class introspection data, this decides if that will be replaced with thePropertyDescriptorreturned bygetExposeAsProperty(). The default isfalse, that is, the oldPropertyDescriptoris kept, and the new one is ignored. JavaBean properties discovered with the standard (non-MethodAppearanceFineTuner) mechanism are added before those created by theMethodAppearanceFineTuner, so with this you can decide if a real JavaBeans property can be replaced by the "fake" one created withsetExposeAsProperty(PropertyDescriptor).- Since:
- 2.3.28
-
getExposeMethodAs
public java.lang.String getExposeMethodAs()
-
setExposeMethodAs
public void setExposeMethodAs(java.lang.String exposeAsMethod)
-
getMethodShadowsProperty
public boolean getMethodShadowsProperty()
-
setMethodShadowsProperty
public void setMethodShadowsProperty(boolean shadowEarlierProperty)
-
-