About 2,580,000 results
Open links in new tab
  1. How and where are Annotations used in Java? - Stack Overflow

    Sep 3, 2009 · Java EE 5 favors the use of annotations over XML configuration. For example, in EJB3 the transaction attributes on an EJB method are specified using annotations.

  2. Java Annotations - Stack Overflow

    Java annotations associate information with the annotated program element. Beside Java annotations Java programs have copious amounts of informal documentation that typically is …

  3. What is the purpose of annotations in Java? - Stack Overflow

    Java @Annotation @Annotation (from Java 5) adds a metadata which are used for instruction in compile, deployment and run time. It is defined by RetentionPolicy RetentionPolicy defines a …

  4. java - Multiple annotations of the same type on one element?

    Oct 12, 2009 · I'm attempting to slap two or more annotations of the same type on a single element, in this case, a method. Here's the approximate code that I'm working with: public …

  5. How to supply Enum value to an annotation from a Constant in Java

    I'm unable to use an Enum taken from a Constant as a parameter in an annotation. I get this compilation error: "The value for annotation attribute [attribute] must be an enum constant …

  6. Is there something like Annotation Inheritance in java?

    161 I'm exploring annotations and came to a point where some annotations seems to have a hierarchy among them. I'm using annotations to generate code in the background for Cards. …

  7. java - Using annotations for exception handling? - Stack Overflow

    Using annotations for exception handling? Asked 12 years ago Modified 3 years, 2 months ago Viewed 34k times

  8. How to extend Java annotation? - Stack Overflow

    Mar 2, 2014 · 30 From Java language specification, Chapter 9.6 Annotation Types: No extends clause is permitted. (Annotation types implicitly extend annotation.Annotation.) So, you can not …

  9. Which types can be used for Java annotation members?

    Invalid type for annotation member": public @interface MyAnnotation { Object myParameter; ^^^^^^ } Obviously Object cannot be used as type of an annotation member. Unfortunately I …

  10. java - How to use an array constant in an annotation - Stack …

    As already was mentioned in previous posts, annotation vales are compile-time constants and there is no way to use an array value as a parameter. I solved this problem a bit differently. If …