org.apache.cocoon.components.treeprocessor.variables
Class VariableResolverFactory
java.lang.Object
|
+--org.apache.cocoon.components.treeprocessor.variables.VariableResolverFactory
- public class VariableResolverFactory
- extends java.lang.Object
Method Summary |
static VariableResolver |
getResolver(java.lang.String expression,
org.apache.avalon.framework.component.ComponentManager manager)
Get a resolver for a given expression. |
static boolean |
needsResolve(java.lang.String expression)
Does an expression need resolving (i.e. contain {...} patterns) ? |
static void |
setDisposableCollector(java.util.List collector)
Set the thread-local list where all created resolvers that need to be
disposed will be collected.
|
static java.lang.String |
unescape(java.lang.String expression)
Unescape an expression that doesn't need to be resolved, but may contain
escaped '{' characters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VariableResolverFactory
public VariableResolverFactory()
setDisposableCollector
public static void setDisposableCollector(java.util.List collector)
- Set the thread-local list where all created resolvers that need to be
disposed will be collected.
The purpose of collecting resolvers is to avoid manual release (or lack thereof)
that requires most ProcessingNodes
to implement Disposable
.
needsResolve
public static boolean needsResolve(java.lang.String expression)
- Does an expression need resolving (i.e. contain {...} patterns) ?
unescape
public static java.lang.String unescape(java.lang.String expression)
- Unescape an expression that doesn't need to be resolved, but may contain
escaped '{' characters.
- Parameters:
expression
- the expression to unescape.- Returns:
- the unescaped result, or
expression
if unescaping isn't necessary.
getResolver
public static VariableResolver getResolver(java.lang.String expression,
org.apache.avalon.framework.component.ComponentManager manager)
throws PatternException
- Get a resolver for a given expression. Chooses the most efficient implementation
depending on
expression
.
Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.