首先,程序元素必须包含元数据注释。
元数据是用称为注释的程序元素表示的。
Metadata is expressed using program elements called annotations.
注解是表达程序元素固有特性的最佳选择。
Annotations are best for expressing the inherent characteristics of a program element.
元数据功能定义了向程序元素提供注释的机制。
A metadata facility defines a mechanism to supply annotations to program elements.
元数据是表示关于程序元素的额外信息的方法。
Metadata is a way to express additional information about program elements.
生成器和处理程序元素由以下属性组成
The generator and handler elements are made up of these attributes
使用资源环境提供程序元素。
这个枚举定义了注释类型可应用的不同程序元素。
This enum defines the various program elements that an annotation type can target. Listing 9 show the ElementType enum in its entirety.
每个元数据表都保留有关程序元素的信息。
Each metadata table holds information about the elements of your program.
概念上,这种结构可以以横切的方式在程序元素上附加注释。
Conceptually, such a construct allows you to attach annotations to program elements in a crosscutting manner.
最明显的元注释就是允许何种程序元素具有定义的注释类型。
The most obvious meta-annotation is one that allows you to indicate which program elements can have annotations of the defined type.
如果不使用元数据编程,那么每个程序元素只能使用一个名字。
In programming without metadata, you can use only one name in each program element.
标准元数据功能提供了表示关于程序元素的额外信息的方便方法。
The standard metadata facility provides an easy way to express additional information about program elements.
如果多个程序元素有同样的注释声明,那么就会产生不必要的混乱。
If the same annotation declaration appears for multiple program elements, however, it can lead to unnecessary clutter.
有鉴于此,建议您不要将限制性关键字用作程序元素的名称。
For this reason, we recommend that you not use restricted keywords as the names of program elements.
一个支持提供注释的AOP系统可以以横切方式将注释附加到程序元素上。
An AOP system that supports supplying annotations will let you attach annotations to program elements in a crosscutting manner.
这个资源库包含所有程序元素的全部版本,使小组能够管理代码和跟踪变化。
The repository contains all editions of all program elements, allowing a team to manage code and track changes.
理想情况是,注释类型应当表示程序元素的抽象功能,而不是它们预期的消费。
Ideally, annotation types should represent abstract characteristics of a program element and not their expected consumption.
支持消费注释的AOP系统使您可以基于与程序元素相关联的注释选择连接点。
An AOP system that supports consuming annotations will let you select join points based on annotations associated with program elements.
使用AOP结构提供注释背后的基本想法是避免将程序元素定义与注释相混淆。
The basic idea behind supplying annotation using an AOP construct is to avoid cluttering the program element's definition with annotations.
当你学完后边的课程,你将学到更多的程序元素并学会如何使用它们。
As you complete the following lessons, you will learn more about these elements and how to use them.
在编程语言上下文中,元数据是添加到程序元素如方法、字段、类和包上的额外信息。
In the programming language context, metadata is additional information attached to program elements such as methods, fields, classes, and packages.
在AOP编程中使用元数据将类与方面之间的耦合限制为附加在程序元素上的元数据。
Using metadata in AOP programming limits the coupling between classes and aspects only to the metadata attached to the program elements.
在其早期的版本中,定制大多数局限于用户界面的改变,即替换图形或者隐藏程序元素。
In its earliest versions, customization was limited mostly to changes in the user interface — replacing graphics or hiding program elements.
过度使用注释会使包含在程序元素的签名和动态上下文中的原有信息无法得到充分利用。
Overusing annotations under-utilizes the information inherently contained in the program element's signature and dynamic context.
如果程序元素的横切特性发生改变,那么它的名字和它的所有引用者都需要做相应的改变。
If a program element's crosscutting characteristics change, its name and all its referers will need to be changed accordingly.
当编码完成时,程序元素就变成了发布候选者;但是,在发布代码之前要求测试成功执行。
A program element becomes a release candidate when coding is complete; however, successful execution of tests is required before the code is released.
将下面的内容faces -confi . xml添加到应用程序元素中。
Add the following content faces-confi.xml within application element.
元数据常常用于协助程序元素与框架或者e JB、EMF和TestNG这样的工具之间的通信。
Metadata is commonly used to facilitate communication between program elements and frameworks or tools such as EJB, EMF, and TestNG.
就像在上面的例子中,当程序元素的名字反映其在多个关注点中的作用时,我们就称之为纠结的签名。
When a program element's name reflects its roles in multiple concerns, as it does in the above example, we call it a tangled signature.
应用推荐