Package freemarker.ext.beans
Class BeansWrapper.MethodAppearanceDecision
java.lang.Object
freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision
- Enclosing class:
- BeansWrapper
Used for
MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)
to store the results; see there.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanGetter pair ofsetReplaceExistingProperty(boolean).booleanvoidsetExposeAsProperty(PropertyDescriptor exposeAsProperty)voidsetExposeMethodAs(String exposeAsMethod)voidsetMethodInsteadOfPropertyValueBeforeCall(boolean methodInsteadOfPropertyValueBeforeCall)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().
-
Constructor Details
-
MethodAppearanceDecision
public MethodAppearanceDecision()
-
-
Method Details
-
getExposeAsProperty
-
setExposeAsProperty
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
-
setExposeMethodAs
-
getMethodShadowsProperty
public boolean getMethodShadowsProperty() -
setMethodShadowsProperty
public void setMethodShadowsProperty(boolean shadowEarlierProperty) -
isMethodInsteadOfPropertyValueBeforeCall
public boolean isMethodInsteadOfPropertyValueBeforeCall()See in the documentation ofMethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision).- Since:
- 2.3.33
-
setMethodInsteadOfPropertyValueBeforeCall
public void setMethodInsteadOfPropertyValueBeforeCall(boolean methodInsteadOfPropertyValueBeforeCall)See in the documentation ofMethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision).- Since:
- 2.3.33
-