org.apache.cocoon.components.treeprocessor.variables
Class PreparedVariableResolver

java.lang.Object
  extended byorg.apache.cocoon.components.treeprocessor.variables.VariableResolver
      extended byorg.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver
All Implemented Interfaces:
Disposable

public final class PreparedVariableResolver
extends VariableResolver
implements Disposable

Prepared implementation of VariableResolver for fast evaluation.

Version:
CVS $Id: PreparedVariableResolver.java 179045 2005-05-30 11:08:13Z cziegeler $
Author:
Upayavira

Field Summary
protected static org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token CLOSE_TOKEN
           
protected static org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token COLON_TOKEN
           
protected static org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token EMPTY_TOKEN
           
protected  boolean needsMapStack
           
protected static org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token OPEN_TOKEN
           
protected  List tokens
           
 
Fields inherited from class org.apache.cocoon.components.treeprocessor.variables.VariableResolver
EMPTY_MAP, originalExpr
 
Constructor Summary
PreparedVariableResolver(String expr, ServiceManager manager)
           
 
Method Summary
 void dispose()
           
protected  org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token getNewModuleToken(String moduleName)
           
protected  org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token getNewVariableToken(String variable)
           
 String resolve(InvokeContext context, Map objectModel)
          Resolve all {...} patterns using the values given in the list of maps and the object model.
 
Methods inherited from class org.apache.cocoon.components.treeprocessor.variables.VariableResolver
buildMap, buildParameters, equals, hashCode, resolve, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

tokens

protected List tokens

needsMapStack

protected boolean needsMapStack

COLON_TOKEN

protected static org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token COLON_TOKEN

OPEN_TOKEN

protected static org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token OPEN_TOKEN

CLOSE_TOKEN

protected static org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token CLOSE_TOKEN

EMPTY_TOKEN

protected static org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token EMPTY_TOKEN
Constructor Detail

PreparedVariableResolver

public PreparedVariableResolver(String expr,
                                ServiceManager manager)
                         throws PatternException
Method Detail

getNewVariableToken

protected org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token getNewVariableToken(String variable)

getNewModuleToken

protected org.apache.cocoon.components.treeprocessor.variables.PreparedVariableResolver.Token getNewModuleToken(String moduleName)
                                                                                                         throws PatternException
Throws:
PatternException

resolve

public final String resolve(InvokeContext context,
                            Map objectModel)
                     throws PatternException
Description copied from class: VariableResolver
Resolve all {...} patterns using the values given in the list of maps and the object model.

Specified by:
resolve in class VariableResolver
Throws:
PatternException

dispose

public final void dispose()
Specified by:
dispose in interface Disposable


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.