The calling method needs a return type annotation.
主调用的方法必须有一个返回类型的注解。
Using type annotation for function parameters helps ensure that a function will accept only data that it can process.
为函式参数使用型别附注,可帮助确保函式只接受它能处理的资料。
You can also explicitly specify the return value of a function by providing a type annotation after all the parameters.
也可以通过在所有参数后面指定类型批注,从而显式指定函数的返回类型。
Type annotation of variables, constants, and functions helps reduce programming errors by limiting data appropriate types.
变数、常数和函式的型别附注借由限制资料适当型别的方式,来减少程序设计上的错误。
Describes the concept of type annotation and how to use it in a function definition to control the input and output data types.
描述类型批注的概念,以及如何在函数定义中使用它来控制输入和输出数据类型。
A common case where a type annotation is useful on a parameter is when the parameter is an object type and you want to use a member.
类型批注对于参数很有用的一种常见情况是:参数是一个对象类型,而您需要使用一个成员。
Declaring a variable or constant with type annotation ensures that the variable or constant stores only data of the appropriate type.
用类型批注声明变量或常数可确保此变量或常数只存储适当类型的数据。
With the annotator aspect approach, the participation occurs only at the level of a Shared understanding of annotation type.
请使用注释者方面方法,参与只发生在对注释类型的共同理解这一级别。
Each annotation type defines a fixed set of names associated with that annotation.
每个注释类型定义了一组与之关联的固定名称。
In these examples I'll focus on selecting join points by annotation type; further down I'll explain some of the other factors that can weigh in on join point selection.
在这些例子中,我将重点放在通过注释类型选择连接点上,然后我将进一步解释在选择连接点时,其他会起作用的因素。
Essentially, retaining obliviousness is a matter of using the right type of annotation in the right situations, as discussed in the earlier guidelines.
事实上,保持遗忘性就是在正确的地方使用正确的注释类型,如在前面准则中所讨论的那样。
When a pattern matches a part of the text, an annotation is created for the associated type.
当一个模式与文本的一部分匹配时,为相关类型创建一个注解。
This annotation type really shines when you're up too late coding and mistype something, as in Listing 3.
当编码到很晚且输错了某些东西时,此注释类型真的可以发挥很大的作用,如清单 3中所示。
You use the annotation type in Listing 1 exactly the same way you use the built-in annotation types, except that you indicate the custom annotation by both its name and package.
清单1所示注释类型的使用方法和内置注释类型的使用方法完全相同,只不过要同时使用名称和所在的包来指示定制注释。
However, you'll find that several of your annotations might all use the same annotation type.
不过,您将发现多个注释都可能使用相同的注释类型。
First, the derived aspect has a choice of annotation type.
首先,派生的方面可以选择注释类型。
This requires you to supply some sort of metadata on your annotation type, so that the compiler can enforce the annotation's intended functionality.
这就要求您为注释类型提供某种元数据,以便编译器保证按照预期的目的使用注释。
The selected annotation type specifies which result you are interested in, and the selected features of this annotation type specify the detailed part of interest.
选择的注释类型指定您感兴趣的结果,而该注释类型中选择的特征指定感兴趣的细节部分。
The type is the actual construct used, and the annotation itself is the specific usage of that type, in a particular context (see the sidebar, Annotation or annotation type?).
类型是实际使用的结构,在特定上下文中,注释本身是该类型的具体使用(请参阅侧栏 注释或注释类型?)
An annotation is a particular type of feature structure that is attached to a region of the artifact being analyzed.
注释是一种特殊的特征结构,它被附加到需要分析的工件的某个区域。
You shouldn't have any trouble figuring out what this one does, but it's not always obvious why this annotation type is so important.
发现该类型的作用应该不难,但是为什么该注释类型如此重要通常不是很明显。
An annotation type looks a lot like an ordinary class, but it has some unique properties.
注释类型看起来很像普通的类,但是有一些特有的性质。
You don't get the benefit of the shorthand syntax shown in Listing 5, so you might as well be a little more verbose and create better self-documentation for your annotation type.
因为不可能从清单5所示的简写形式中获益,所以您需要创建虽然稍微有点冗长,但是更容易理解的注释类型。
The type system contains information about annotation types and their features.
类型系统包含注释类型及其特征。
This helps you ensure that nobody else takes your annotation type and misapplies it (or, better yet, that you don't misapply it in a fit of fatigue).
这样有助于避免他人误用您的注释类型(或者最好的地方是,您自己也不会因为疲惫而误用它)。
The next standard annotation type is Deprecated.
下一个标准注释类型是 Deprecated 。
The produced analysis results, each derived from the Annotation type, are stored in the CAS.
生成的分析结果(都来自annotation类型)存储在CAS中。
Take note, though — the shorthand version is available only if the annotation type has a single-member variable named value.
不过要注意,只有当注释类型只有一个成员变量,而且变量名为value时,才能使用简写形式。
Note that this annotation type doesn't have a single-member variable, so you gain nothing by naming one of the variables value.
因为该注释类型的成员变量不是一个,所以将一个变量命名为value没有任何意义。
The GroupTODO annotation type in Listing 6 adds several new variables.
清单6中的GroupTODO注释类型中添加了几个新的变量。
应用推荐