Skip to content

Commit

Permalink
Update docs/src/main/asciidoc/cdi-reference.adoc
Browse files Browse the repository at this point in the history
Co-authored-by: Guillaume Smet <[email protected]>
  • Loading branch information
rmanibus and gsmet committed Sep 16, 2024
1 parent d2c4625 commit 035b7b3
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions docs/src/main/asciidoc/cdi-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -957,26 +957,26 @@ Alternatively, you can use the `@LookupIfProperty` and `@LookupUnlessProperty` a
}
----

if there is more than one bean that matches the required type and qualifiers and is eligible for injection, it is possible to iterate (or stream) available bean instances.
If there is more than one bean that matches the required type and qualifiers and is eligible for injection, it is possible to iterate (or stream) available bean instances.
Beans returned by both stream and iterator methods are sorted by priority as defined by `io.quarkus.arc.InjectableBean#getPriority()`. Higher priority goes first.

Check warning on line 961 in docs/src/main/asciidoc/cdi-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'.", "location": {"path": "docs/src/main/asciidoc/cdi-reference.adoc", "range": {"start": {"line": 961, "column": 57}}}, "severity": "INFO"}

[source,java]
----
@ApplicationScoped
class Client {
@ApplicationScoped
class Client {
@Inject
Instance<Service> serviceInstance;
@Inject
Instance<Service> serviceInstance;
void printServiceName() {
if(service.isAmbiguous()){
for (Service service : serviceInstance) {
void printServiceName() {
if(service.isAmbiguous()){
for (Service service : serviceInstance) {
}
}
}
}
----
}
}
}
}
----

[[injecting-multiple-bean-instances-intuitively]]

Check warning on line 981 in docs/src/main/asciidoc/cdi-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.HeadingPunctuation] Do not use end punctuation in headings. Raw Output: {"message": "[Quarkus.HeadingPunctuation] Do not use end punctuation in headings.", "location": {"path": "docs/src/main/asciidoc/cdi-reference.adoc", "range": {"start": {"line": 981, "column": 33}}}, "severity": "INFO"}

Check warning on line 981 in docs/src/main/asciidoc/cdi-reference.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Headings] Use sentence-style capitalization in '4.17. Injecting Multiple Bean Instances Intuitively'. Raw Output: {"message": "[Quarkus.Headings] Use sentence-style capitalization in '4.17. Injecting Multiple Bean Instances Intuitively'.", "location": {"path": "docs/src/main/asciidoc/cdi-reference.adoc", "range": {"start": {"line": 981, "column": 33}}}, "severity": "INFO"}
=== Injecting Multiple Bean Instances Intuitively
Expand Down

0 comments on commit 035b7b3

Please sign in to comment.