Package org.apache.tiles.template
Class ComposeStackUtil
- java.lang.Object
-
- org.apache.tiles.template.ComposeStackUtil
-
public final class ComposeStackUtil extends java.lang.Object
Utilities to work with compose stacks.- Since:
- 3.0.0
- Version:
- $Rev: 1305937 $ $Date: 2012-03-28 05:15:15 +1100 (Wed, 28 Mar 2012) $
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COMPOSE_STACK_ATTRIBUTE_NAME
The name of the attribute that holds the compose stack.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Object
findAncestorWithClass(java.util.Deque<java.lang.Object> composeStack, java.lang.Class<?> clazz)
Finds the first ancestor in the stack, that is assignable to the given class.static java.util.Deque<java.lang.Object>
getComposeStack(org.apache.tiles.request.Request request)
Returns the current compose stack, or creates a new one if not present.
-
-
-
Field Detail
-
COMPOSE_STACK_ATTRIBUTE_NAME
public static final java.lang.String COMPOSE_STACK_ATTRIBUTE_NAME
The name of the attribute that holds the compose stack.- See Also:
- Constant Field Values
-
-
Method Detail
-
findAncestorWithClass
public static java.lang.Object findAncestorWithClass(java.util.Deque<java.lang.Object> composeStack, java.lang.Class<?> clazz)
Finds the first ancestor in the stack, that is assignable to the given class.- Parameters:
composeStack
- The 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 java.util.Deque<java.lang.Object> getComposeStack(org.apache.tiles.request.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
-
-