Generated (Java EE 5)

Java EE API


javax.annotation Annotation Type Generated


@Documented
@Retention(value=SOURCE)
@Target(value={PACKAGE,TYPE,ANNOTATION_TYPE,METHOD,CONSTRUCTOR,FIELD,LOCAL_VARIABLE,PARAMETER})
public @interface Generated

Implements: Annotation
@Documented
@Retention(value=SOURCE)
@Target(value={PACKAGE, TYPE, ANNOTATION_TYPE, METHOD, CONSTRUCTOR, FIELD, LOCAL_VARIABLE, PARAMETER})

Generated 注释用于标记已生成的源代码。它也可以用于区分单个文件中用户编写的代码和生成的代码。使用时,值元素必须有代码生成器的名称。建议的约定是在值字段中使用代码生成器的完全限定名。例如:com.company.package.classname。日期元素用于表示生成源代码的日期。日期元素必须遵循 ISO 8601 标准。例如,日期元素可能是值 2001-07-04T12:08:56.235-0700,它表示美国太平洋时区的本地时间 2001-07-04 12:08:56。注释元素是代码生成器想要在生成代码中包含的所有注释的占位符 (place holder)。
英文文档:

The Generated annoation is used to mark source code that has been generated. It can also be used to differentiate user written code from generated code in a single file. When used, the value element must have the name of the code generator. The recommended convention is to use the fully qualified name of the code generator in the value field . For example: com.company.package.classname. The date element is used to indicate the date the source was generated. The date element must follow the ISO 8601 standard. For example the date element would have the following value 2001-07-04T12:08:56.235-0700 which represents 2001-07-04 12:08:56 local time in the U.S. Pacific Time time zone. The comment element is a place holder for any comments that the code generator may want to include in the generated code.

Since:
1.0

Required Element Summary
 String[]
 
Optional Element Summary
 String
 String
 

Element Detail

abstract public String[] value()
此方法由代码生成器使用,以标记生成的类和方法。
英文文档:

value

public abstract String[] value
This is used by the code generator to mark the generated classes and methods.

abstract public String date()
生成源代码的日期。
英文文档:

date

public abstract String date
Date when the source was generated.

Default:
""

abstract public String comments()
代码生成器想要在生成代码中包含的所有注释的占位符。
英文文档:

comments

public abstract String comments
A place holder for any comments that the code generator may want to include in the generated code.

Default:
""


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!