0

Beginner's question. I see a lot of @XXXXX s in our code base. So I would like to know what is the significance of this syntax. Below is a snippet of our code and example

@Process     
public Message loadManifest(Message message) {

How can we relate this to JBoss AS Pipeline?

  • 1
    take a look https://docs.oracle.com/javase/tutorial/java/annotations/ – Federico Sierra May 07 '15 at 17:03
  • @gubblebozer : My question is also in relation with the RHEL JBoss, how can it fit in there to the pipeline, will edit the question now. –  May 07 '15 at 17:23

4 Answers4

0

This is an annotation. It's uses vary from preventing warnings during compilation (like @SuppressWarnings), to automation of creating servlet mappings. This link may clarify the concept a bit more.

In case of your particular example, my bet is it's this one

CptBartender
  • 1,235
  • 8
  • 22
  • This actually is Jboss snippet which I have as an example. Thanks your answer is informative. –  May 07 '15 at 17:41
0

They are most likely custom Java Annotation.

Martin
  • 3,960
  • 7
  • 43
  • 43
0

@Process is called an annotation. A big part of java is reflection, which is the ability for a class to see the methods and fields of other classes. It is very nice and it has created a lot awesome libraries.

Annotations are accessible through reflection.

yxre
  • 3,576
  • 21
  • 20
0

@ tags are Annotations

As per Sun, Oracle: Annotations, a form of metadata, provide data about a program that is not part of the program itself. Annotations have no direct effect on the operation of the code they annotate.

Annotations have a number of uses, among them:

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.

Annotations - Oracle reference

Rajesh
  • 2,135
  • 1
  • 12
  • 14