001/*
002 * ============================================================================
003 *  Copyright © 2002-2022 by Thomas Thrien.
004 *  All Rights Reserved.
005 * ============================================================================
006 *  Licensed to the public under the agreements of the GNU Lesser General Public
007 *  License, version 3.0 (the "License"). You may obtain a copy of the License at
008 *
009 *       http://www.gnu.org/licenses/lgpl.html
010 *
011 *  Unless required by applicable law or agreed to in writing, software
012 *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
013 *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
014 *  License for the specific language governing permissions and limitations
015 *  under the License.
016 */
017
018package org.tquadrat.foundation.annotation;
019
020import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
021import static java.lang.annotation.ElementType.CONSTRUCTOR;
022import static java.lang.annotation.ElementType.FIELD;
023import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
024import static java.lang.annotation.ElementType.METHOD;
025import static java.lang.annotation.ElementType.MODULE;
026import static java.lang.annotation.ElementType.PACKAGE;
027import static java.lang.annotation.ElementType.PARAMETER;
028import static java.lang.annotation.ElementType.RECORD_COMPONENT;
029import static java.lang.annotation.ElementType.TYPE;
030import static java.lang.annotation.ElementType.TYPE_PARAMETER;
031import static java.lang.annotation.ElementType.TYPE_USE;
032import static java.lang.annotation.RetentionPolicy.RUNTIME;
033import static org.apiguardian.api.API.Status.STABLE;
034
035import java.lang.annotation.Documented;
036import java.lang.annotation.Repeatable;
037import java.lang.annotation.Retention;
038import java.lang.annotation.Target;
039
040import org.apiguardian.api.API;
041
042/**
043 *  This annotation allows to add information about applied fixes to a program
044 *  element.
045 *
046 *  @extauthor Thomas Thrien - thomas.thrien@tquadrat.org
047 *  @version $Id: BUG.java 1118 2024-03-15 16:14:15Z tquadrat $
048 *  @since 0.1.0
049 *
050 *  @UMLGraph.link
051 */
052@SuppressWarnings( "NewClassNamingConvention" )
053@ClassVersion( sourceVersion = "$Id: BUG.java 1118 2024-03-15 16:14:15Z tquadrat $" )
054@API( status = STABLE, since = "0.1.0" )
055@Documented
056@Retention( RUNTIME )
057@Target( {ANNOTATION_TYPE, CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, MODULE, PACKAGE, PARAMETER, RECORD_COMPONENT, TYPE, TYPE_PARAMETER, TYPE_USE} )
058@Repeatable( FixList.class )
059public @interface BUG
060{
061        /*------------*\
062    ====** Attributes **=======================================================
063        \*------------*/
064    /**
065     *  An optional comment regarding the bug fix.
066     *
067     *  @return The comment.
068     */
069    String comment() default "";
070
071    /**
072     *  The BUG id as provided by the bug tracking system.
073     *
074     *  @return The BUG id.
075     */
076    @SuppressWarnings( "NewMethodNamingConvention" )
077    String id();
078}
079//  @interface BUG
080
081/*
082 *  End of File
083 */