| Modifier and Type | Method and Description |
|---|---|
MockBean.Builder<T> |
MockBean.Builder.addQualifier(Annotation qualifier) |
MockBean.Builder<T> |
MockBean.Builder.addStereotype(Class<? extends Annotation> stereotype) |
MockBean.Builder<T> |
MockBean.Builder.addType(Type type) |
MockBean.Builder<T> |
MockBean.Builder.alternative(boolean value) |
MockBean.Builder<T> |
MockBean.Builder.beanClass(Class<?> beanClass) |
static <T> MockBean.Builder<T> |
MockBean.builder()
By default, the bean:
has no name
has
Dependent scope
has Any qualifier and Default is added automatically if no other qualifiers are set
has Object bean type
has no stereotypes
is not an alternative
|
MockBean.Builder<T> |
MockBean.Builder.create(MockBean.CreateFunction<T> callback) |
MockBean.Builder<T> |
MockBean.Builder.creating(T instance)
Each invocation of
Contextual.create(CreationalContext) will return the same instance. |
MockBean.Builder<T> |
MockBean.Builder.destroy(MockBean.DestroyFunction<T> callback) |
MockBean.Builder<T> |
MockBean.Builder.globallySelectedAlternative(int priority)
This beans is a globally enabled alternative with a priority equal to its method parameter.
|
MockBean.Builder<T> |
MockBean.Builder.name(String name) |
MockBean.Builder<T> |
MockBean.Builder.priority(int priority)
Programmatic equivalent to to putting
Priority annotation on a bean class. |
MockBean.Builder<T> |
MockBean.Builder.qualifiers(Annotation... qualifiers) |
static <T> MockBean.Builder<T> |
MockBean.read(Class<T> beanClass)
A convenient method to create a
MockBean.Builder initialized from the specified bean class. |
MockBean.Builder<T> |
MockBean.Builder.scope(Class<? extends Annotation> scope) |
MockBean.Builder<T> |
MockBean.Builder.selectedAlternative()
The bean is an alternative and should be automatically selected for the synthetic bean archive.
|
MockBean.Builder<T> |
MockBean.Builder.selectedAlternative(Class<?> beanClass)
The bean has the given bean class, is an alternative and should be automatically selected for the synthetic bean archive.
|
MockBean.Builder<T> |
MockBean.Builder.stereotypes(Class<? extends Annotation>... stereotypes) |
MockBean.Builder<T> |
MockBean.Builder.types(Set<Type> types) |
MockBean.Builder<T> |
MockBean.Builder.types(Type... types) |
MockBean.Builder<T> |
MockBean.Builder.useUnmanaged(Class<T> beanClass)
Use
Unmanaged to create/destroy the bean instance. |
Copyright © 2019. All rights reserved.