Coverage Report - org.apache.maven.tools.plugin.annotations.datamodel.ExecuteAnnotationContent
 
Classes in this File Line Coverage Branch Coverage Complexity
ExecuteAnnotationContent
94 %
17/18
N/A
1
 
 1  
 package org.apache.maven.tools.plugin.annotations.datamodel;
 2  
 
 3  
 /*
 4  
  * Licensed to the Apache Software Foundation (ASF) under one
 5  
  * or more contributor license agreements.  See the NOTICE file
 6  
  * distributed with this work for additional information
 7  
  * regarding copyright ownership.  The ASF licenses this file
 8  
  * to you under the Apache License, Version 2.0 (the
 9  
  * "License"); you may not use this file except in compliance
 10  
  * with the License.  You may obtain a copy of the License at
 11  
  *
 12  
  *   http://www.apache.org/licenses/LICENSE-2.0
 13  
  *
 14  
  * Unless required by applicable law or agreed to in writing,
 15  
  * software distributed under the License is distributed on an
 16  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 17  
  * KIND, either express or implied.  See the License for the
 18  
  * specific language governing permissions and limitations
 19  
  * under the License.
 20  
  */
 21  
 
 22  
 import org.apache.maven.plugins.annotations.Execute;
 23  
 import org.apache.maven.plugins.annotations.LifecyclePhase;
 24  
 
 25  
 import java.lang.annotation.Annotation;
 26  
 
 27  
 /**
 28  
  * @author Olivier Lamy
 29  
  * @since 3.0
 30  
  */
 31  1
 public class ExecuteAnnotationContent
 32  
     implements Execute
 33  
 {
 34  
     private String goal;
 35  
 
 36  
     private String lifecycle;
 37  
 
 38  
     private LifecyclePhase phase;
 39  
 
 40  
     public LifecyclePhase phase()
 41  
     {
 42  1
         return this.phase;
 43  
     }
 44  
 
 45  
     public String goal()
 46  
     {
 47  1
         return this.goal;
 48  
     }
 49  
 
 50  
     public String lifecycle()
 51  
     {
 52  1
         return this.lifecycle;
 53  
     }
 54  
 
 55  
 
 56  
     public void phase( String phase )
 57  
     {
 58  1
         this.phase = LifecyclePhase.valueOf( phase );
 59  1
     }
 60  
 
 61  
     public void goal( String goal )
 62  
     {
 63  1
         this.goal = goal;
 64  1
     }
 65  
 
 66  
     public void lifecycle( String lifecycle )
 67  
     {
 68  1
         this.lifecycle = lifecycle;
 69  1
     }
 70  
 
 71  
 
 72  
     public Class<? extends Annotation> annotationType()
 73  
     {
 74  0
         return null;
 75  
     }
 76  
 
 77  
     @Override
 78  
     public String toString()
 79  
     {
 80  2
         final StringBuilder sb = new StringBuilder();
 81  2
         sb.append( "ExecuteAnnotationContent" );
 82  2
         sb.append( "{goal='" ).append( goal ).append( '\'' );
 83  2
         sb.append( ", lifecycle='" ).append( lifecycle ).append( '\'' );
 84  2
         sb.append( ", phase=" ).append( phase );
 85  2
         sb.append( '}' );
 86  2
         return sb.toString();
 87  
     }
 88  
 }