org.codehaus.plexus.interpolation

Class PrefixAwareRecursionInterceptor

public class PrefixAwareRecursionInterceptor extends Object implements RecursionInterceptor

RecursionInterceptor implementation that provides support for expressions with multiple synonyms, such as project.build.directory == pom.build.directory == build.directory in Maven's POM.

Version: $Id: PrefixAwareRecursionInterceptor.java 7529 2008-07-20 20:24:21Z olamy $

Author: jdcasey

Field Summary
static StringDEFAULT_END_TOKEN
static StringDEFAULT_START_TOKEN
Constructor Summary
PrefixAwareRecursionInterceptor(Collection possiblePrefixes, boolean watchUnprefixedExpressions)
Use the specified expression prefixes to detect synonyms, and specify whether unprefixed expressions can be considered synonyms.
PrefixAwareRecursionInterceptor(Collection possiblePrefixes)
Use the specified expression prefixes to detect synonyms.
Method Summary
voidexpressionResolutionFinished(String expression)
voidexpressionResolutionStarted(String expression)
ListgetExpressionCycle(String expression)
When an expression is determined to be a recursive reference, this method returns the sublist of tracked expressions that participate in this cycle.
booleanhasRecursiveExpression(String expression)

Field Detail

DEFAULT_END_TOKEN

public static final String DEFAULT_END_TOKEN

DEFAULT_START_TOKEN

public static final String DEFAULT_START_TOKEN

Constructor Detail

PrefixAwareRecursionInterceptor

public PrefixAwareRecursionInterceptor(Collection possiblePrefixes, boolean watchUnprefixedExpressions)
Use the specified expression prefixes to detect synonyms, and specify whether unprefixed expressions can be considered synonyms.

Parameters: possiblePrefixes The collection of expression prefixes supported watchUnprefixedExpressions Whether to consider unprefixed expressions as synonyms

PrefixAwareRecursionInterceptor

public PrefixAwareRecursionInterceptor(Collection possiblePrefixes)
Use the specified expression prefixes to detect synonyms. Consider unprefixed expressions synonyms as well.

Parameters: possiblePrefixes The collection of expression prefixes supported

Method Detail

expressionResolutionFinished

public void expressionResolutionFinished(String expression)

expressionResolutionStarted

public void expressionResolutionStarted(String expression)

getExpressionCycle

public List getExpressionCycle(String expression)
When an expression is determined to be a recursive reference, this method returns the sublist of tracked expressions that participate in this cycle. Otherwise, if the expression isn't present in the in-process stack, return Collections#EMPTY_LIST. Also, if the expression doesn't have a matched prefix from this interceptor's list, and unprefixed expressions aren't allowed then return Collections#EMPTY_LIST.

hasRecursiveExpression

public boolean hasRecursiveExpression(String expression)
Copyright © 2001-2009 Codehaus. All Rights Reserved.