BeansWrapper.MethodAppearanceDecision (FreeMarker 2.3.35 API)
Description: declaration: package: freemarker.ext.beans, class: BeansWrapper, class: MethodAppearanceDecision

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 Object
Used for `MethodAppearanceFineTuner.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

  Modifier and Type
  Method
  Description
  `PropertyDescriptor`
  `getExposeAsProperty()`
  See in the documentation of `MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)`.
  `String`
  `getExposeMethodAs()`
  See in the documentation of `MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)`.
  `boolean`
  `getMethodShadowsProperty()`
  See in the documentation of `MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)`.
  `boolean`
  `getReplaceExistingProperty()`
  Getter pair of `setReplaceExistingProperty(boolean)`.
  `boolean`
  `isMethodInsteadOfPropertyValueBeforeCall()`
  See in the documentation of `MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)`.
  `void`
  `setExposeAsProperty​(PropertyDescriptor exposeAsProperty)`
  See in the documentation of `MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)`.
  `void`
  `setExposeMethodAs​(String exposeAsMethod)`
  See in the documentation of `MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)`.
  `void`
  `setMethodInsteadOfPropertyValueBeforeCall​(boolean methodInsteadOfPropertyValueBeforeCall)`
  See in the documentation of `MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)`.
  `void`
  `setMethodShadowsProperty​(boolean shadowEarlierProperty)`
  See in the documentation of `MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)`.
  `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()`.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### MethodAppearanceDecision

    public MethodAppearanceDecision()

- ## Method Details

  - ### getExposeAsProperty

    public PropertyDescriptor getExposeAsProperty()
    See in the documentation of `MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)`.

  - ### setExposeAsProperty

    public void setExposeAsProperty​(PropertyDescriptor exposeAsProperty)
    See in the documentation of `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.

  - ### getReplaceExistingProperty

    public boolean getReplaceExistingProperty()
    Getter pair of `setReplaceExistingProperty(boolean)`.
    Since:
      2.3.28

  - ### setReplaceExistingProperty

    public 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()`. 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)`.
    Since:
      2.3.28

  - ### getExposeMethodAs

    public String getExposeMethodAs()
    See in the documentation of `MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)`.

  - ### setExposeMethodAs

    public void setExposeMethodAs​(String exposeAsMethod)
    See in the documentation of `MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)`.

  - ### getMethodShadowsProperty

    public boolean getMethodShadowsProperty()
    See in the documentation of `MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)`.

  - ### setMethodShadowsProperty

    public void setMethodShadowsProperty​(boolean shadowEarlierProperty)
    See in the documentation of `MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)`.

  - ### isMethodInsteadOfPropertyValueBeforeCall

    public boolean isMethodInsteadOfPropertyValueBeforeCall()
    See in the documentation of `MethodAppearanceFineTuner.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 of `MethodAppearanceFineTuner.process(freemarker.ext.beans.BeansWrapper.MethodAppearanceDecisionInput, freemarker.ext.beans.BeansWrapper.MethodAppearanceDecision)`.
    Since:
      2.3.33