Coverage Report - org.codehaus.plexus.interpolation.object.ObjectInterpolator
 
Classes in this File Line Coverage Branch Coverage Complexity
ObjectInterpolator
N/A
N/A
1
 
 1  
 package org.codehaus.plexus.interpolation.object;
 2  
 
 3  
 /*
 4  
  * Copyright 2001-2008 Codehaus Foundation.
 5  
  *
 6  
  * Licensed under the Apache License, Version 2.0 (the "License");
 7  
  * you may not use this file except in compliance with the License.
 8  
  * You may obtain a copy of the License at
 9  
  *
 10  
  *      http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing, software
 13  
  * distributed under the License is distributed on an "AS IS" BASIS,
 14  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 15  
  * See the License for the specific language governing permissions and
 16  
  * limitations under the License.
 17  
  */
 18  
 
 19  
 import java.util.List;
 20  
 
 21  
 import org.codehaus.plexus.interpolation.BasicInterpolator;
 22  
 import org.codehaus.plexus.interpolation.InterpolationException;
 23  
 import org.codehaus.plexus.interpolation.Interpolator;
 24  
 import org.codehaus.plexus.interpolation.RecursionInterceptor;
 25  
 
 26  
 /**
 27  
  * Traverses an object graph and uses an {@link Interpolator} instance to resolve any String values in the
 28  
  * graph. 
 29  
  * 
 30  
  * @author jdcasey
 31  
  */
 32  
 public interface ObjectInterpolator
 33  
 {
 34  
     
 35  
     /**
 36  
      * Traverse the object graph from the given starting point and interpolate 
 37  
      * any Strings found in that graph using the given {@link Interpolator}.
 38  
      * 
 39  
      * @param target The starting point of the object graph to traverse
 40  
      * @param interpolator The {@link Interpolator} used to resolve any Strings encountered during traversal.
 41  
      */
 42  
     void interpolate( Object target, BasicInterpolator interpolator )
 43  
         throws InterpolationException;
 44  
     
 45  
     /**
 46  
      * Traverse the object graph from the given starting point and interpolate 
 47  
      * any Strings found in that graph using the given {@link Interpolator}.
 48  
      * 
 49  
      * @param target The starting point of the object graph to traverse
 50  
      * @param interpolator The {@link Interpolator} used to resolve any Strings encountered during traversal.
 51  
      * @param recursionInterceptor The {@link RecursionInterceptor} used to detect cyclical expressions in the graph
 52  
      */
 53  
     void interpolate( Object target, BasicInterpolator interpolator, RecursionInterceptor recursionInterceptor )
 54  
         throws InterpolationException;
 55  
 
 56  
     /**
 57  
      * Returns true if the last interpolation execution generated warnings.
 58  
      */
 59  
     boolean hasWarnings();
 60  
     
 61  
     /**
 62  
      * Retrieve the {@link List} of warnings ({@link ObjectInterpolationWarning}
 63  
      * instances) generated during the last interpolation execution.
 64  
      */
 65  
     List getWarnings();
 66  
 
 67  
 }