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

Adjust wording of specification and API around @Priority usage on ste… #531

Merged
merged 1 commit into from
Sep 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
*
* <p>
* A stereotype may declare a {@link jakarta.annotation.Priority &#064;Priority} annotation, which specifies that
* every bean with the stereotype has given priority. This enables and orders alternatives, interceptors, and decorators.
* every bean with the stereotype is enabled and has given priority.
* </p>
*
* <pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public interface StereotypeInfo {

/**
* Returns the priority value this stereotype declares using the {@link jakarta.annotation.Priority @Priority}
* meta-annotation. All alternatives and interceptors with this stereotype will be enabled for the application
* and ordered using this priority value (unless they declare priority explicitly).
* meta-annotation. Beans with this stereotype will be enabled for the application and ordered using this priority
* value (unless they declare priority explicitly).
* <p>
* Returns {@code null} if this stereotype is not meta-annotated {@code @Priority}.
*
Expand Down
2 changes: 1 addition & 1 deletion spec/src/main/asciidoc/core/definition.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ public @interface Mock {}

===== Declaring stereotype with `@Priority`

A stereotype may declare a `@Priority` annotation which functions as a means of enabling and ordering affected alternatives, interceptors, and decorators (in {cdi_full}).
A stereotype may declare a `@Priority` annotation which functions as a means of enabling and ordering affected beans.

If a bean declares two different stereotypes that declare different priority values, the bean must explicitly declare a `@Priority` annotation. If the bean does not explicitly declare priority, the container automatically detects the problem and treats it as a definition error.

Expand Down