There are query handlers (methods) residing inside of a projection (aka Query model). If those could be annotated with @QueryHandler and their parameters with @Query then the CQRS API would be completed with @QueryDispatcher, having both the command and the query side kind of symmetric.
@interface QueryHandler {
String name() default "";
String namespace() default "";
}
@interface Query {
String name() default "";
String namespace() default "";
}
@interface QueryDispatcher {
String dispatches() default "";
}
What do you think?