View Javadoc
1   package org.apache.maven.tools.plugin.extractor.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  public class ExecuteAnnotationContent
32      implements Execute
33  {
34      private String goal;
35  
36      private String lifecycle;
37  
38      private LifecyclePhase phase;
39  
40      @Override
41      public LifecyclePhase phase()
42      {
43          return this.phase;
44      }
45  
46      @Override
47      public String goal()
48      {
49          return this.goal;
50      }
51  
52      @Override
53      public String lifecycle()
54      {
55          return this.lifecycle;
56      }
57  
58  
59      public void phase( String phase )
60      {
61          this.phase = LifecyclePhase.valueOf( phase );
62      }
63  
64      public void goal( String goal )
65      {
66          this.goal = goal;
67      }
68  
69      public void lifecycle( String lifecycle )
70      {
71          this.lifecycle = lifecycle;
72      }
73  
74  
75      @Override
76      public Class<? extends Annotation> annotationType()
77      {
78          return null;
79      }
80  
81      @Override
82      public String toString()
83      {
84          final StringBuilder sb = new StringBuilder();
85          sb.append( "ExecuteAnnotationContent" );
86          sb.append( "{goal='" ).append( goal ).append( '\'' );
87          sb.append( ", lifecycle='" ).append( lifecycle ).append( '\'' );
88          sb.append( ", phase=" ).append( phase );
89          sb.append( '}' );
90          return sb.toString();
91      }
92  }