Annotation Interface ZenEvent.Bus.Auto

Enclosing class:
ZenEvent.Bus

@Target({}) @Retention(RUNTIME) public static @interface ZenEvent.Bus.Auto
Enables automatic determination of the type of event carried by an event bus.

Automatic determination of the event type is allowed solely if the class owning the field annotated with ZenEvent.Bus is annotated by the ZenEvent annotation. Automatic discovery is thus prohibited in classes annotated by ZenEvent.BusCarrier.

If the above requirement is met, then the class is examined and an attempt to locate either a ZenCodeType.Name or a NativeTypeRegistration annotation is performed. If at least one is present, then automatic discovery can proceed, otherwise automatic determination is not possible.

If the ZenCodeType.Name annotation is present, then the owning class itself is treated as the event class itself, and thus that is the result of the automatic discovery process. If the NativeTypeRegistration annotation is present, on the other hand, the class references by its NativeTypeRegistration.value() will be used as the result of the automatic discovery process. If both annotations are present, then ZenCodeType.Name will take precedence.

Since:
11.0.0