-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds a better API for registering custom stereotypes, similar to existing APIs: `StereotypeRegistrar` and `StereotypeRegistrarBuildItem`. The existing `AdditionalStereotypeBuildItem` is very confusing to use, so it is deprecated and all its usages are replaced with the new API. Also, this commit allows defining stereotypes for synthetic beans. Scope, name, alternative status and priority are all applied to the synthetic bean, but interceptor bindings are not. We don't apply interceptors to synthetic beans in general, this case is not an exception.
- Loading branch information
Showing
18 changed files
with
475 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
.../arc/deployment/src/main/java/io/quarkus/arc/deployment/StereotypeRegistrarBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.quarkus.arc.deployment; | ||
|
||
import io.quarkus.arc.processor.StereotypeRegistrar; | ||
import io.quarkus.builder.item.MultiBuildItem; | ||
|
||
/** | ||
* Makes it possible to register annotations that should be considered stereotypes but are not annotated with | ||
* {@code javax.enterprise.inject.Stereotype}. | ||
*/ | ||
public final class StereotypeRegistrarBuildItem extends MultiBuildItem { | ||
|
||
private final StereotypeRegistrar registrar; | ||
|
||
public StereotypeRegistrarBuildItem(StereotypeRegistrar registrar) { | ||
this.registrar = registrar; | ||
} | ||
|
||
public StereotypeRegistrar getStereotypeRegistrar() { | ||
return registrar; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.