net.sf.jelly.apt.strategies
Class StrategyStack

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector<E>
              extended by java.util.Stack<TemplateStrategy>
                  extended by net.sf.jelly.apt.strategies.StrategyStack
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<TemplateStrategy>, java.util.Collection<TemplateStrategy>, java.util.List<TemplateStrategy>, java.util.RandomAccess

public class StrategyStack
extends java.util.Stack<TemplateStrategy>

A stack for pushing the current strategy.

Author:
Ryan Heaton
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Method Summary
<S extends TemplateStrategy>
S
findFirst(java.lang.Class<S> clazz)
          Finds the first strategy that is of the specified class.
static StrategyStack get()
          The current stack.
 
Methods inherited from class java.util.Stack
empty, peek, pop, push, search
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Method Detail

get

public static StrategyStack get()
The current stack.

Returns:
The current stack.

findFirst

public <S extends TemplateStrategy> S findFirst(java.lang.Class<S> clazz)
Finds the first strategy that is of the specified class.

Parameters:
clazz - The class.
Returns:
The strategy.