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

Address TODO in inter-module injection. #537

Merged
merged 1 commit into from
Oct 11, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions spec/src/main/asciidoc/core/injectionandresolution.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ A bean is _available for injection_ in a certain module if:
* the bean is either not an alternative, or the module is a bean archive and the bean is a selected alternative for the application, and
* the bean class is required to be accessible to classes in the module, according to the class accessibility requirements of the module architecture.

For a custom implementation of the `Bean` interface defined in <<bean>>, the container calls `getBeanClass()` to determine the bean class of the bean and `InjectionPoint.getMember()` and then `Member.getDeclaringClass()` to determine the class that declares an injection point.
// TODO this refers to Portable Extensions, maybe move to Full? maybe mention Build Compatible Extensions?

[[typesafe_resolution]]

=== Typesafe resolution
Expand Down
12 changes: 7 additions & 5 deletions spec/src/main/asciidoc/core/injectionandresolution_full.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,16 @@ The container automatically detects inconsistent specialization and treats it as

==== Inter-module injection in {cdi_full}

In addition to rules defined in <<inter_module_injection>>, the following rules apply.
Instead of the rules in <<inter_module_injection>>, the following rules apply in {cdi_full}.

A bean is also _available for injection_ in a certain module if:
A bean is _available for injection_ in a certain module if:

* the bean is not a decorator,
* the bean is either not an alternative, or the module is a bean archive and the bean is a selected alternative of the bean archive.
Ladicek marked this conversation as resolved.
Show resolved Hide resolved
* the bean is not an interceptor or decorator,
* the bean is enabled,
* the bean is either not an alternative, or the module is a bean archive and the bean is a selected alternative of the bean archive, or the bean is a selected alternative of the application, and
* the bean class is required to be accessible to classes in the module, according to the class accessibility requirements of the module architecture.

// TODO here, maybe we shouldn't do "in addition to", but "is overridden" and spell out the full rules again
For a custom implementation of the `Bean` interface defined in <<bean>>, the container calls `getBeanClass()` to determine the bean class of the bean and `InjectionPoint.getMember()` and then `Member.getDeclaringClass()` to determine the class that declares an injection point.

[[typesafe_resolution_full]]

Expand Down