Top Description Inners Methods
jakarta.enterprise.inject

public @Interface Specializes

extends Annotation
Known Direct Implementers
jakarta.enterprise.inject.Specializes.Literal
Annotations
@Target:TYPE, METHOD
@Retention:RUNTIME
@Documented
Static Imports
java.lang.annotation.ElementType.METHOD, .ElementType.TYPE, .RetentionPolicy.RUNTIME

Indicates that a bean directly specializes another bean. May be applied to a bean class or producer method.

If a bean directly specializes a second bean, it inherits:

If the second bean has a name, the bean may not declare a name using @Named. Furthermore, the bean must have all the bean types of the second bean.

If a bean is specialized by any enabled bean, the first bean is disabled.

CDI Lite implementations are not required to provide support for specialization.

Authors
Gavin King, Pete Muir

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Specializes.Literal

Supports inline instantiation of the Specializes annotation.

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString
jakarta.enterprise.inject back to summary

public final Class Specializes.Literal

extends AnnotationLiteral<Specializes>
implements Specializes
Class Inheritance
All Implemented Interfaces
jakarta.enterprise.inject.Specializes, java.lang.annotation.Annotation

Supports inline instantiation of the Specializes annotation.
Author
Martin Kouba
Since
2.0
See Also
Instance, Event

Field Summary

Modifier and TypeField and Description
public static final Specializes.Literal
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from jakarta.enterprise.util.AnnotationLiteral:
annotationTypeequalshashCodetoString

Field Detail

INSTANCEback to summary
public static final Specializes.Literal INSTANCE
serialVersionUIDback to summary
private static final long serialVersionUID

Hides jakarta.enterprise.util.AnnotationLiteral.serialVersionUID.

Constructor Detail

Literalback to summary
public Literal()