001package org.apache.maven.tools.plugin.extractor.annotations.datamodel;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements.  See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership.  The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License.  You may obtain a copy of the License at
011 *
012 *   http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied.  See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022import org.apache.maven.plugins.annotations.Execute;
023import org.apache.maven.plugins.annotations.LifecyclePhase;
024
025import java.lang.annotation.Annotation;
026
027/**
028 * @author Olivier Lamy
029 * @since 3.0
030 */
031public class ExecuteAnnotationContent
032    implements Execute
033{
034    private String goal;
035
036    private String lifecycle;
037
038    private LifecyclePhase phase;
039
040    @Override
041    public LifecyclePhase phase()
042    {
043        return this.phase;
044    }
045
046    @Override
047    public String goal()
048    {
049        return this.goal;
050    }
051
052    @Override
053    public String lifecycle()
054    {
055        return this.lifecycle;
056    }
057
058
059    public void phase( String phase )
060    {
061        this.phase = LifecyclePhase.valueOf( phase );
062    }
063
064    public void goal( String goal )
065    {
066        this.goal = goal;
067    }
068
069    public void lifecycle( String lifecycle )
070    {
071        this.lifecycle = lifecycle;
072    }
073
074
075    @Override
076    public Class<? extends Annotation> annotationType()
077    {
078        return null;
079    }
080
081    @Override
082    public String toString()
083    {
084        final StringBuilder sb = new StringBuilder();
085        sb.append( "ExecuteAnnotationContent" );
086        sb.append( "{goal='" ).append( goal ).append( '\'' );
087        sb.append( ", lifecycle='" ).append( lifecycle ).append( '\'' );
088        sb.append( ", phase=" ).append( phase );
089        sb.append( '}' );
090        return sb.toString();
091    }
092}