public final class UnremovableBeanBuildItem
extends io.quarkus.builder.item.MultiBuildItem
ArcConfig.removeUnusedBeans is set to true.
Consider using one of the convenient static factory methods such as beanTypes(Class...):
@BuildStep
UnremovableBeanBuildItem unremovable() {
// Any bean that has MyService in its set of bean types is considered unremovable
return UnremovableBeanBuildItem.beanTypes(MyService.class);
}
Alternatively, you could make use of the pre-built predicate classes such as UnremovableBeanBuildItem.BeanClassNameExclusion:
@BuildStep
UnremovableBeanBuildItem unremovable() {
// A bean whose bean class FQCN is equal to org.acme.MyService is considered unremovable
return new UnremovableBeanBuildItem(new BeanClassNameExclusion("org.acme.MyService"));
}
| Modifier and Type | Class and Description |
|---|---|
static class |
UnremovableBeanBuildItem.BeanClassAnnotationExclusion |
static class |
UnremovableBeanBuildItem.BeanClassNameExclusion |
static class |
UnremovableBeanBuildItem.BeanClassNamesExclusion |
static class |
UnremovableBeanBuildItem.BeanTypeExclusion |
static class |
UnremovableBeanBuildItem.BeanTypesExclusion |
| Constructor and Description |
|---|
UnremovableBeanBuildItem(Predicate<BeanInfo> predicate) |
| Modifier and Type | Method and Description |
|---|---|
static UnremovableBeanBuildItem |
beanClassAnnotation(org.jboss.jandex.DotName annotationName)
Match class beans whose target class contains the specified annotation.
|
static UnremovableBeanBuildItem |
beanClassAnnotation(String nameStartsWith)
Match class beans whose target class contains an annotation whose name starts with the specified value.
|
static UnremovableBeanBuildItem |
beanClassNames(Set<String> classNames)
Match beans whose bean class matches any of the specified class names.
|
static UnremovableBeanBuildItem |
beanClassNames(String... classNames)
Match beans whose bean class matches any of the specified class names.
|
static UnremovableBeanBuildItem |
beanTypes(Class<?>... types)
Match beans which have any of the specified type names in its set of bean types.
|
static UnremovableBeanBuildItem |
beanTypes(org.jboss.jandex.DotName... typeNames)
Match beans which have any of the specified type names in its set of bean types.
|
static UnremovableBeanBuildItem |
beanTypes(Set<org.jboss.jandex.DotName> typeNames)
Match beans which have any of the specified type names in its set of bean types.
|
Predicate<BeanInfo> |
getPredicate() |
static UnremovableBeanBuildItem |
targetWithAnnotation(org.jboss.jandex.DotName annotationName)
Match beans whose target (class, method or field) is annotated with the specified annotation.
|
public static UnremovableBeanBuildItem beanClassNames(String... classNames)
classNames - public static UnremovableBeanBuildItem beanClassNames(Set<String> classNames)
classNames - public static UnremovableBeanBuildItem beanTypes(org.jboss.jandex.DotName... typeNames)
typeNames - public static UnremovableBeanBuildItem beanTypes(Class<?>... types)
typeNames - public static UnremovableBeanBuildItem beanTypes(Set<org.jboss.jandex.DotName> typeNames)
typeNames - public static UnremovableBeanBuildItem beanClassAnnotation(org.jboss.jandex.DotName annotationName)
The annotations can be declared on the class, and every nested element of the class (fields, types, methods, etc).
annotationName - public static UnremovableBeanBuildItem beanClassAnnotation(String nameStartsWith)
The annotations can be declared on the class, and every nested element of the class (fields, types, methods, etc).
annotationName - public static UnremovableBeanBuildItem targetWithAnnotation(org.jboss.jandex.DotName annotationName)
annotationName - Copyright © 2021 JBoss by Red Hat. All rights reserved.