001/*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *   http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied.  See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 */
019package org.apache.maven.tools.plugin.extractor.annotations.datamodel;
020
021/**
022 * Holds scanned data from a {@code @After} annotation
023 * ({@code org.apache.maven.api.plugin.annotations.After}).
024 * <p>
025 * The {@code @After} annotation declares that the annotated mojo must run
026 * after another phase has completed.  It carries three attributes:
027 * <ul>
028 *   <li>{@code phase}  &ndash; the phase this mojo must run after</li>
029 *   <li>{@code type}   &ndash; the scope type ({@code PROJECT}, {@code DEPENDENCIES}, {@code CHILDREN})</li>
030 *   <li>{@code scope}  &ndash; the dependency scope</li>
031 * </ul>
032 * <p>
033 * Setter method names match the annotation attribute names so that
034 * {@link org.apache.maven.tools.plugin.extractor.annotations.scanner.DefaultMojoAnnotationsScanner#populateAnnotationContent}
035 * can fill them via reflection.
036 *
037 * @since 4.0.0
038 */
039public class AfterAnnotationContent {
040    private String phase;
041
042    private String type;
043
044    private String scope;
045
046    public String phase() {
047        return this.phase;
048    }
049
050    public void phase(String phase) {
051        this.phase = phase;
052    }
053
054    public String type() {
055        return this.type;
056    }
057
058    public void type(String type) {
059        this.type = type;
060    }
061
062    public String scope() {
063        return this.scope;
064    }
065
066    public void scope(String scope) {
067        this.scope = scope;
068    }
069
070    @Override
071    public String toString() {
072        final StringBuilder sb = new StringBuilder();
073        sb.append("AfterAnnotationContent");
074        sb.append("{phase='").append(phase).append('\'');
075        sb.append(", type='").append(type).append('\'');
076        sb.append(", scope='").append(scope).append('\'');
077        sb.append('}');
078        return sb.toString();
079    }
080}