org.codehaus.plexus.interpolation

Class SimpleRecursionInterceptor

public class SimpleRecursionInterceptor extends Object implements RecursionInterceptor

Simplest implementation of a RecursionInterceptor, which checks whether the existing interpolation effort is already attempting to resolve an exact expression, but has not finished. This will not catch synonym expressions, as are found in Maven (${project.build.directory}, ${pom.build.directory}, and ${build.directory} are synonyms).

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

Author: jdcasey

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)
Check whether the current expression is already present in the in-process stack.

Method Detail

expressionResolutionFinished

public void expressionResolutionFinished(String expression)
{@inheritDoc }

expressionResolutionStarted

public void expressionResolutionStarted(String expression)
{@inheritDoc }

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.

hasRecursiveExpression

public boolean hasRecursiveExpression(String expression)
Check whether the current expression is already present in the in-process stack.
Copyright © 2001-2009 Codehaus. All Rights Reserved.