org.apache.tiles.autotag.core.runtime

## Class AbstractModelBody

- java.lang.Object
- - org.apache.tiles.autotag.core.runtime.AbstractModelBody

- All Implemented Interfaces:
    ModelBody
  Direct Known Subclasses:
    FreemarkerModelBody, JspModelBody, VelocityModelBody

      public abstract class AbstractModelBody
      extends Object
      implements ModelBody

  Base class for the abstraction of the body.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractModelBody(Writer defaultWriter)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `evaluate()` Evaluates the body and writes in the default writer.
    `String` | `evaluateAsString()` Evaluates a body and returns it as a string.
    `void` | `evaluateWithoutWriting()` Evaluates a body, but discards result.

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

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

    - ### Methods inherited from interface org.apache.tiles.autotag.core.runtime.ModelBody

      `evaluate`

- - ### Constructor Detail

    - #### AbstractModelBody

          public AbstractModelBody(Writer defaultWriter)

      Constructor.
      Parameters:
        `defaultWriter` - The default writer to use.

  - ### Method Detail

    - #### evaluate

          public void evaluate()
                        throws IOException

      Description copied from interface: `ModelBody`
      Evaluates the body and writes in the default writer.
      Specified by:
        `evaluate` in interface `ModelBody`
      Throws:
        `IOException` - If something goes wrong.

    - #### evaluateAsString

          public String evaluateAsString()
                                  throws IOException

      Description copied from interface: `ModelBody`
      Evaluates a body and returns it as a string.
      Specified by:
        `evaluateAsString` in interface `ModelBody`
      Returns:
        The body, as a string.
      Throws:
        `IOException` - If something goes wrong.

    - #### evaluateWithoutWriting

          public void evaluateWithoutWriting()
                                      throws IOException

      Description copied from interface: `ModelBody`
      Evaluates a body, but discards result.
      Specified by:
        `evaluateWithoutWriting` in interface `ModelBody`
      Throws:
        `IOException` - If something goes wrong.

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