Skip to main content
This revision made February 04, 2013 17:19, by Rajiv Mordani

Common Annotations for the Java Platform 1.2 Maintenance Release

1. Add new annotation – javax.annotation.Priority in section 2.7 defined as follows:

The Priority annotation can be applied to classes to indicate in what order the classes should be used. The effect of using the Priority annotation in any particular instance is defined by other specifications that define the use of a specific class.

For example, the Interceptors specification defines the use of priorities on interceptors to control the order in which interceptors are called.

Priority values should generally be non-negative, with negative values reserved for special meanings such as "undefined" or "not specified". A specification that defines use of the Priority annotation may define the range of allowed priorities and any priority values with special meaning.

 package javax.annotation;
 import java.lang.annotation.*;
 import static java.lang.annotation.ElementType.*;
 import static java.lang.annotation.RetentionPolicy.*;
 @Target({TYPE}) 
 @Retention(RUNTIME)
 @Documented
 public @interface Priority {
    /**
     * The priority value.
     */
    int value();
 } 

2. Update Resource annotation as follows

Return Class<?> from Resource.type() instead of the raw Class type.

Difference compared to previous revision
} 2. Update Resource annotation as follows Return Class from Resource.type() instead of the raw Class type.
 
 
Close
loading
Please Confirm
Close