Path: blob/master/src/java.compiler/share/classes/javax/annotation/processing/Generated.java
41159 views
/*1* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/24package javax.annotation.processing;2526import java.lang.annotation.*;27import static java.lang.annotation.ElementType.*;28import static java.lang.annotation.RetentionPolicy.*;2930/**31* The Generated annotation is used to mark source code that has been generated.32* It can also be used to differentiate user written code from generated code in33* a single file.34*35* <h2>Examples:</h2>36* <pre>37* @Generated("com.example.Generator")38* </pre>39* <pre>40* @Generated(value="com.example.Generator", date= "2017-07-04T12:08:56.235-0700")41* </pre>42* <pre>43* @Generated(value="com.example.Generator", date= "2017-07-04T12:08:56.235-0700",44* comments= "comment 1")45* </pre>46*47* @since 948*/49@Documented50@Retention(SOURCE)51@Target({PACKAGE, TYPE, METHOD, CONSTRUCTOR, FIELD,52LOCAL_VARIABLE, PARAMETER})53public @interface Generated {5455/**56* The value element MUST have the name of the code generator. The57* name is the fully qualified name of the code generator.58*59* @return The name of the code generator60*/61String[] value();6263/**64* Date when the source was generated. The date element must follow the ISO65* 8601 standard. For example the date element would have the following66* value 2017-07-04T12:08:56.235-0700 which represents 2017-07-04 12:08:5667* local time in the U.S. Pacific Time time zone.68*69* @return The date the source was generated70*/71String date() default "";7273/**74* A place holder for any comments that the code generator may want to75* include in the generated code.76*77* @return Comments that the code generated included78*/79String comments() default "";80}818283