@XXXXX 到底是用来做什么的?
For what exactly @XXXXX is used for?
初学者的问题。我在我们的代码库中看到很多 @XXXXX 。所以我想知道这个语法的意义是什么。
下面是我们的代码片段和示例
@Process
public Message loadManifest(Message message) {
我们如何将其与 JBoss AS 管道联系起来?
这是注释。它的用途多种多样,从在编译期间防止警告(如@SuppressWarnings)到创建 servlet 映射的自动化。 This link 可能会更清楚地说明这个概念。
对于您的特定示例,我敢打赌它是 this one
它们很可能是习俗 Java Annotation。
@Process
称为注解。 java 的很大一部分是反射,这是 class 看到其他 class 的方法和字段的能力。它非常好,它创建了很多很棒的库。
注释可以通过反射访问。
@标签为注解
根据 Sun 的说法,甲骨文:
注释是一种元数据形式,它提供有关程序的数据,但该数据不属于程序本身。注解对其所注解的代码的运行没有直接影响。
注释有多种用途,其中包括:
Information for the compiler — Annotations can be used by the compiler to detect errors or suppress warnings.
Compile-time and deployment-time processing — Software tools can process annotation information to generate code, XML files, and so forth.
Runtime processing — Some annotations are available to be examined at runtime.
初学者的问题。我在我们的代码库中看到很多 @XXXXX 。所以我想知道这个语法的意义是什么。 下面是我们的代码片段和示例
@Process
public Message loadManifest(Message message) {
我们如何将其与 JBoss AS 管道联系起来?
这是注释。它的用途多种多样,从在编译期间防止警告(如@SuppressWarnings)到创建 servlet 映射的自动化。 This link 可能会更清楚地说明这个概念。
对于您的特定示例,我敢打赌它是 this one
它们很可能是习俗 Java Annotation。
@Process
称为注解。 java 的很大一部分是反射,这是 class 看到其他 class 的方法和字段的能力。它非常好,它创建了很多很棒的库。
注释可以通过反射访问。
@标签为注解
根据 Sun 的说法,甲骨文: 注释是一种元数据形式,它提供有关程序的数据,但该数据不属于程序本身。注解对其所注解的代码的运行没有直接影响。
注释有多种用途,其中包括:
Information for the compiler — Annotations can be used by the compiler to detect errors or suppress warnings.
Compile-time and deployment-time processing — Software tools can process annotation information to generate code, XML files, and so forth.
Runtime processing — Some annotations are available to be examined at runtime.