1. Domino Brix
  2. Codegen & annotations

Key annotations

  • @BrixPresenter – generate presenter impl and lifecycle wiring.
  • @UiView – generate a _UiView subclass and DI bindings.
  • @BrixComponent – generate component initializer for router registration.
  • @BrixRoute – map presenter to a route; supports custom routing provider.
  • @BrixSlot / @RegisterSlots – declare and supply slots.
  • @ListenFor, @PathParameter, @QueryParameter, @FragmentParameter – wire events and routing state.
  • Lifecycle annotations: @OnReveal, @OnBeforeReveal, @OnActivated, @OnDeactivated, @OnStateChanged, @OnRemove.
  • Handlers: @UiHandler on presenter methods, @Handlers on view fields.
  • Qualifiers: @BrixTask for startup tasks, @Global for shared core beans.

Minimal example

			@BrixPresenter
public class AdminPresenter extends Presenter<AdminView> {
  @Override
  public Set<String> getRoles() {
    return Set.of("admin");
  }

  @Override
  public Authorizer getAuthorizer() {
    return RolesAllowedAuthorizer.INSTANCE;
  }
}

		

What gets generated

  • *PresenterImpl: lifecycle hooks, routing parameter mapping, event/handler wiring.
  • *_UiView: handler injection and Dagger bindings.
  • *Routing: token filters for the router.
  • BrixComponentInitializer: service entry in META-INF/services for router registration.

We are a group of passionate people who love what we do

Donate & Support Us