com.opensymphony.xwork2.ognl

## Class OgnlValueStackFactory

- java.lang.Object
- - com.opensymphony.xwork2.ognl.OgnlValueStackFactory

- All Implemented Interfaces:
    ValueStackFactory

      public class OgnlValueStackFactory
      extends Object
      implements ValueStackFactory

  Creates an Ognl value stack

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected RootAccessor` | `compoundRootAccessor`
    `protected Container` | `container`
    `protected TextProvider` | `textProvider`
    `protected XWorkConverter` | `xworkConverter`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OgnlValueStackFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `containerAllowsStaticFieldAccess()` Deprecated. since 6.4.0, no replacement.
    `ValueStack` | `createValueStack()` Get a new instance of `ValueStack`
    `ValueStack` | `createValueStack(ValueStack stack)` Get a new instance of `ValueStack`
    `protected ValueStack` | `createValueStack(ValueStack stack, boolean useTextProvider)`
    `protected void` | `registerAdditionalMethodAccessors()` Note that the default `MethodAccessor` for handling `Object` methods is registered in `setMethodAccessor(ognl.MethodAccessor)` and can be configured using the extension point `StrutsConstants.STRUTS_METHOD_ACCESSOR`.
    `protected void` | `registerNullHandlers()`
    `protected void` | `registerPropertyAccessors()`
    `protected void` | `setCompoundRootAccessor(RootAccessor compoundRootAccessor)`
    `protected void` | `setContainer(Container container)` `PropertyAccessor`'s, `MethodAccessor`'s and `NullHandler`'s are registered on a per-class basis by defining a bean adhering to the corresponding interface with a name corresponding to the class it is intended to handle.
    `protected void` | `setMethodAccessor(ognl.MethodAccessor methodAccessor)`
    `protected void` | `setTextProvider(TextProvider textProvider)`
    `protected void` | `setXWorkConverter(XWorkConverter converter)`

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

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

- - ### Field Detail

    - #### xworkConverter

          protected XWorkConverter xworkConverter

    - #### compoundRootAccessor

          protected RootAccessor compoundRootAccessor

    - #### textProvider

          protected TextProvider textProvider

    - #### container

          protected Container container

  - ### Constructor Detail

    - #### OgnlValueStackFactory

          public OgnlValueStackFactory()

  - ### Method Detail

    - #### setXWorkConverter

          protected void setXWorkConverter(XWorkConverter converter)

    - #### setCompoundRootAccessor

          protected void setCompoundRootAccessor(RootAccessor compoundRootAccessor)

    - #### setMethodAccessor

          protected void setMethodAccessor(ognl.MethodAccessor methodAccessor)

    - #### setTextProvider

          protected void setTextProvider(TextProvider textProvider)

    - #### createValueStack

          public ValueStack createValueStack()

      Description copied from interface: `ValueStackFactory`
      Get a new instance of `ValueStack`
      Specified by:
        `createValueStack` in interface `ValueStackFactory`
      Returns:
        a new `ValueStack`.

    - #### createValueStack

          public ValueStack createValueStack(ValueStack stack)

      Description copied from interface: `ValueStackFactory`
      Get a new instance of `ValueStack`
      Specified by:
        `createValueStack` in interface `ValueStackFactory`
      Parameters:
        `stack` - an existing stack to include.
      Returns:
        a new `ValueStack`.

    - #### createValueStack

          protected ValueStack createValueStack(ValueStack stack,
                                                boolean useTextProvider)

    - #### setContainer

          protected void setContainer(Container container)
                               throws ClassNotFoundException

      `PropertyAccessor`'s, `MethodAccessor`'s and `NullHandler`'s are registered on a per-class basis by defining a bean adhering to the corresponding interface with a name corresponding to the class it is intended to handle.

      The only exception is the `MethodAccessor` for the `Object` type which has its own extension point.

      Throws:
        `ClassNotFoundException`
      See Also:
        `setMethodAccessor(MethodAccessor)`, `registerAdditionalMethodAccessors()`

    - #### registerAdditionalMethodAccessors

          protected void registerAdditionalMethodAccessors()

      Note that the default `MethodAccessor` for handling `Object` methods is registered in `setMethodAccessor(ognl.MethodAccessor)` and can be configured using the extension point `StrutsConstants.STRUTS_METHOD_ACCESSOR`.

    - #### registerNullHandlers

          protected void registerNullHandlers()
                                       throws ClassNotFoundException

      Throws:
        `ClassNotFoundException`

    - #### registerPropertyAccessors

          protected void registerPropertyAccessors()
                                            throws ClassNotFoundException

      Throws:
        `ClassNotFoundException`

    - #### containerAllowsStaticFieldAccess

          @Deprecated
          protected boolean containerAllowsStaticFieldAccess()

      Deprecated. since 6.4.0, no replacement.

Copyright © 2000–2025 Apache Software Foundation. All rights reserved.