Annotation Interface Reserve


@Target({TYPE,METHOD,FIELD}) @Retention(RUNTIME) @Documented public @interface Reserve

Specifies that a bean is a reserve. May be applied to a bean class, producer method or field or stereotype.

 @Reserve
 @Priority(1)
 @Dependent
 public class DefaultOrder extends Order { ... }
 

During typesafe resolution, non-reserve beans take precedence over reserve beans.

A reserve is not available for injection, lookup or name resolution in a module unless the reserve is selected for the application (by adding the Priority annotation).

Unlike alternatives, reserves cannot be selected for a bean archive in beans.xml.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Supports inline instantiation of the Reserve annotation.