Interface SyntheticComponents
public interface SyntheticComponents
Allows registering synthetic beans and observers.
- Since:
 - 4.0
 
- 
Method Summary
Modifier and TypeMethodDescription<T> SyntheticBeanBuilder<T> Creates aSyntheticBeanBuilderthat allows configuring a new synthetic bean of givenimplementationClass.<T> SyntheticObserverBuilder<T> addObserver(Type eventType) Creates aSyntheticObserverBuilderthat allows configuring a new synthetic observer for giveneventType.<T> SyntheticObserverBuilder<T> addObserver(Class<T> eventType) Creates aSyntheticObserverBuilderthat allows configuring a new synthetic observer for giveneventType. 
- 
Method Details
- 
addBean
Creates aSyntheticBeanBuilderthat allows configuring a new synthetic bean of givenimplementationClass. The synthetic bean will be registered at the end of the@Synthesismethod.- Type Parameters:
 T- the implementation class of the new synthetic bean- Parameters:
 implementationClass- the implementation class of the new synthetic bean, must not benull- Returns:
 - a new 
SyntheticBeanBuilder, nevernull 
 - 
addObserver
Creates aSyntheticObserverBuilderthat allows configuring a new synthetic observer for giveneventType. The synthetic observer will be registered at the end of the@Synthesismethod.- Type Parameters:
 T- the observed event type of the new synthetic observer- Parameters:
 eventType- the observed event type of the new synthetic observer, must not benull- Returns:
 - a new 
SyntheticObserverBuilder, nevernull 
 - 
addObserver
Creates aSyntheticObserverBuilderthat allows configuring a new synthetic observer for giveneventType. The synthetic observer will be registered at the end of the@Synthesismethod.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)) ...- Type Parameters:
 T- the observed event type of the new synthetic observer- Parameters:
 eventType- the observed event type of the new synthetic observer, must not benull- Returns:
 - a new 
SyntheticObserverBuilder, nevernull 
 
 -