The default qualifier type.
If a bean does not explicitly declare a qualifier other than @Named, the bean has the
qualifier @Default.
If an injection point declares no qualifier, the injection point has exactly one qualifier, the default qualifier @Default.
The following are equivalent:
@ConversationScoped
public class Order {
private Product product;
private User customer;
@Inject
public void init(@Selected Product product, User customer) {
this.product = product;
this.customer = customer;
}
}
@Default
@ConversationScoped
public class Order {
private Product product;
private User customer;
@Inject
public void init(@Selected Product product, @Default User customer) {
this.product = product;
this.customer = customer;
}
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | Default.Literal
Supports inline instantiation of the |
Default qualifier.
| Modifier and Type | Field and Description |
|---|---|
| public static final Default. | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| INSTANCE | back to summary |
|---|---|
| public static final Default. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides javax. | |
| Literal | back to summary |
|---|---|
| public Literal() | |