public interface SyntheticComponents
| Modifier and Type | Method and Description |
|---|---|
<T> SyntheticBeanBuilder<T> |
addBean(java.lang.Class<T> beanClass)
Creates a
SyntheticBeanBuilder that allows configuring a new synthetic bean
of given beanClass. |
<T> SyntheticObserverBuilder<T> |
addObserver(java.lang.Class<T> eventType)
Creates a
SyntheticObserverBuilder that allows configuring a new synthetic observer
for given eventType. |
<T> SyntheticObserverBuilder<T> |
addObserver(Type eventType)
Creates a
SyntheticObserverBuilder that allows configuring a new synthetic observer
for given eventType. |
<T> SyntheticBeanBuilder<T> addBean(java.lang.Class<T> beanClass)
SyntheticBeanBuilder that allows configuring a new synthetic bean
of given beanClass. The synthetic bean will be registered at the end of
the @Synthesis method.T - the bean class of the new synthetic beanbeanClass - the bean class of the new synthetic bean, must not be nullSyntheticBeanBuilder, never null<T> SyntheticObserverBuilder<T> addObserver(java.lang.Class<T> eventType)
SyntheticObserverBuilder that allows configuring a new synthetic observer
for given eventType. The synthetic observer will be registered at the end of
the @Synthesis method.T - the observed event type of the new synthetic observereventType - the observed event type of the new synthetic observer, must not be nullSyntheticObserverBuilder, never null<T> SyntheticObserverBuilder<T> addObserver(Type eventType)
SyntheticObserverBuilder that allows configuring a new synthetic observer
for given eventType. The synthetic observer will be registered at the end of
the @Synthesis method.
This method is supposed to be called with explicitly provided type arguments. For example,
to define a synthetic observer of event type List<String>, one would call:
// types is of type Types
// syntheticComponents is of type SyntheticComponents
syntheticComponents.<List<String>>addObserver(types.parameterized(List.class, String.class))
...
T - the observed event type of the new synthetic observereventType - the observed event type of the new synthetic observer, must not be nullSyntheticObserverBuilder, never null