org.apache.tiles.template
Class ComposeStackUtil

java.lang.Object
  extended by org.apache.tiles.template.ComposeStackUtil

public final class ComposeStackUtil
extends java.lang.Object

Utilities to work with compose stacks.

Since:
2.2.0
Version:
$Rev: 797765 $ $Date: 2009-07-25 15:20:26 +0200 (sab, 25 lug 2009) $

Method Summary
static java.lang.Object findAncestorWithClass(ArrayStack<java.lang.Object> composeStack, java.lang.Class<?> clazz)
          Finds the first ancestor in the stack, that is assignable to the given class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findAncestorWithClass

public static java.lang.Object findAncestorWithClass(ArrayStack<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:
2.2.0