Coverage Report - org.apache.maven.plugin.registry.TrackableBase
 
Classes in this File Line Coverage Branch Coverage Complexity
TrackableBase
0 %
0/11
0 %
0/6
3
 
 1  
 /*
 2  
  =================== DO NOT EDIT THIS FILE ====================
 3  
  Generated by Modello 1.0.1 on 2009-09-09 03:08:20,
 4  
  any modifications will be overwritten.
 5  
  ==============================================================
 6  
  */
 7  
 
 8  
 package org.apache.maven.plugin.registry;
 9  
 
 10  
 /**
 11  
  * common base class that contains code to track the source for
 12  
  * this instance (USER|GLOBAL).
 13  
  * 
 14  
  * @version $Revision$ $Date$
 15  
  */
 16  0
 public class TrackableBase
 17  
     implements java.io.Serializable
 18  
 {
 19  
 
 20  
     public static final String USER_LEVEL = "user-level";
 21  
     public static final String GLOBAL_LEVEL = "global-level";
 22  
 
 23  0
     private String sourceLevel = USER_LEVEL;
 24  0
     private boolean sourceLevelSet = false;
 25  
 
 26  
     public void setSourceLevel( String sourceLevel )
 27  
     {
 28  0
         if ( sourceLevelSet )
 29  
         {
 30  0
             throw new IllegalStateException( "Cannot reset sourceLevel attribute; it is already set to: " + sourceLevel );
 31  
         }
 32  0
         else if ( !( USER_LEVEL.equals( sourceLevel ) || GLOBAL_LEVEL.equals( sourceLevel ) ) )
 33  
         {
 34  0
             throw new IllegalArgumentException( "sourceLevel must be one of: {" + USER_LEVEL + "," + GLOBAL_LEVEL + "}" );
 35  
         }
 36  
         else
 37  
         {
 38  0
             this.sourceLevel = sourceLevel;
 39  0
             this.sourceLevelSet = true;
 40  
         }
 41  0
     }
 42  
 
 43  
     public String getSourceLevel()
 44  
     {
 45  0
         return sourceLevel;
 46  
     }
 47  
           
 48  
 }