@Qualifier @Retention(value=RUNTIME) public @interface Custom
Qualifier annotation
used to annotate HK2 injections and
bindings for user custom providers. Providers are classes which implement one
of the provider interfaces (for example Message body reader interface
).
Custom providers are bound in the HK2 injection manager using @Custom
annotation. Once bound, the custom providers can be injected using @Custom
qualifier annotation again.
For example:
@Inject @Custom MessageBodyReader messageBodyReader;
CustomAnnotationLiteral
Copyright © 2007-2024, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.