Package org.codehaus.plexus.interpolation

Examples of org.codehaus.plexus.interpolation.InterpolationCycleException


                        realExpr = realExpr.substring( 1 );
                    }

                    if ( recursionInterceptor.hasRecursiveExpression( realExpr ) )
                    {
                        throw new InterpolationCycleException( recursionInterceptor, realExpr, wholeExpr );
                    }

                    recursionInterceptor.expressionResolutionStarted( realExpr );

                    Object value = existingAnswers.get( realExpr );
                    Object bestAnswer = null;
                    for ( Iterator it = valueSources.iterator(); it.hasNext() && value == null; )
                    {
                        ValueSource vs = (ValueSource) it.next();

                        value = vs.getValue( realExpr );

                        if ( value != null && value.toString().indexOf( wholeExpr ) > -1 )
                        {
                            bestAnswer = value;
                            value = null;
                        }
                    }

                    // this is the simplest recursion check to catch exact recursion
                    // (non synonym), and avoid the extra effort of more string
                    // searching.
                    if ( value == null && bestAnswer != null )
                    {
                        throw new InterpolationCycleException( recursionInterceptor, realExpr, wholeExpr );
                    }

                    if ( value != null )
                    {
                        value = interpolate( String.valueOf( value ), recursionInterceptor, unresolvable );
View Full Code Here


                        realExpr = realExpr.substring( 1 );
                    }

                    if ( recursionInterceptor.hasRecursiveExpression( realExpr ) )
                    {
                        throw new InterpolationCycleException( recursionInterceptor, realExpr, wholeExpr );
                    }

                    recursionInterceptor.expressionResolutionStarted( realExpr );

                    Object value = existingAnswers.get( realExpr );
                    Object bestAnswer = null;
                    for ( ValueSource vs : valueSources )
                    {
                        if (value != null ) break;

                        value = vs.getValue( realExpr );

                        if ( value != null && value.toString().contains( wholeExpr ) )
                        {
                            bestAnswer = value;
                            value = null;
                        }
                    }

                    // this is the simplest recursion check to catch exact recursion
                    // (non synonym), and avoid the extra effort of more string
                    // searching.
                    if ( value == null && bestAnswer != null )
                    {
                        throw new InterpolationCycleException( recursionInterceptor, realExpr, wholeExpr );
                    }

                    if ( value != null )
                    {
                        value = interpolate( String.valueOf( value ), recursionInterceptor, unresolvable );
View Full Code Here

                        realExpr = realExpr.substring( 1 );
                    }

                    if ( recursionInterceptor.hasRecursiveExpression( realExpr ) )
                    {
                        throw new InterpolationCycleException( recursionInterceptor, realExpr, wholeExpr );
                    }

                    recursionInterceptor.expressionResolutionStarted( realExpr );

                    Object value = existingAnswers.get( realExpr );
                    Object bestAnswer = null;
                    for ( Iterator it = valueSources.iterator(); it.hasNext() && value == null; )
                    {
                        ValueSource vs = (ValueSource) it.next();

                        value = vs.getValue( realExpr );

                        if ( value != null && value.toString().indexOf( wholeExpr ) > -1 )
                        {
                            bestAnswer = value;
                            value = null;
                        }
                    }

                    // this is the simplest recursion check to catch exact recursion
                    // (non synonym), and avoid the extra effort of more string
                    // searching.
                    if ( value == null && bestAnswer != null )
                    {
                        throw new InterpolationCycleException( recursionInterceptor, realExpr, wholeExpr );
                    }

                    if ( value != null )
                    {
                        value = interpolate( String.valueOf( value ), recursionInterceptor, unresolvable );
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.interpolation.InterpolationCycleException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.