Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Generate Event Publishers #554

Merged
merged 16 commits into from
May 2, 2024
Merged

Auto Generate Event Publishers #554

merged 16 commits into from
May 2, 2024

Conversation

SentryMan
Copy link
Collaborator

Makes publishing events more CDI-like. The generator will now create a publisher class when it sees Event<T> injected and a generated impl doesn't already exist.

  • Remove ApplicationEvent Annotation
  • Enhance generator to automatically create publisher classes
  • can now generate generic publishers
  • similar to CDI, adding a qualifier to an Event<T> dependency will create and wire a publisher that by default sends qualified events

@SentryMan SentryMan added the enhancement New feature or request label Apr 27, 2024
@SentryMan SentryMan added this to the 10.0 milestone Apr 27, 2024
@SentryMan SentryMan requested a review from rbygrave April 27, 2024 07:10
@SentryMan SentryMan self-assigned this Apr 27, 2024
@SentryMan SentryMan enabled auto-merge April 27, 2024 16:56
@@ -284,7 +284,7 @@ static String commonParent(String currentTop, String aPackage) {
static String getNamed(Element p) {
final NamedPrism named = NamedPrism.getInstanceOn(p);
if (named != null) {
return named.value();
return named.value().replace("\"", "\\\"");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this replace of quotes here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll revert this. If we are making some change here we want to be explicit in a separate PR and be clear what the change is and why.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason is to bring it in line with the annotation qualifiers

@rbygrave rbygrave disabled auto-merge May 2, 2024 11:05
@rbygrave rbygrave merged commit 7b0cfa3 into avaje:master May 2, 2024
4 checks passed
@SentryMan SentryMan deleted the event-gen branch May 4, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants