org.apache.tiles.template

## Class ComposeStackUtil

- java.lang.Object
- - org.apache.tiles.template.ComposeStackUtil

-     public final class ComposeStackUtil
      extends Object

  Utilities to work with compose stacks.
  Since:
    3.0.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `COMPOSE_STACK_ATTRIBUTE_NAME` The name of the attribute that holds to compose stack.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Object` | `findAncestorWithClass(Deque<Object> composeStack, Class<?> clazz)` Finds the first ancestor in the stack, that is assignable to the given class.
    `static Deque<Object>` | `getComposeStack(Request request)` Returns the current compose stack, or creates a new one if not present.

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

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

- - ### Field Detail

    - #### COMPOSE_STACK_ATTRIBUTE_NAME

          public static final String COMPOSE_STACK_ATTRIBUTE_NAME

      The name of the attribute that holds to compose stack.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### findAncestorWithClass

          public static Object findAncestorWithClass(Deque<Object> composeStack,
                                                     Class<?> clazz)

      Finds the first ancestor in the stack, that is assignable to the given class.
      Parameters:
        `composeStack` - To compose stack to evaluate.
        `clazz` - The class to check.
      Returns:
        The first ancestor that is assignable to the class, or null if not found.
      Since:
        3.0.0

    - #### getComposeStack

          public static Deque<Object> getComposeStack(Request request)

      Returns the current compose stack, or creates a new one if not present.
      Parameters:
        `request` - The request.
      Returns:
        The compose stack.
      Since:
        3.0.0

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