You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
Michael Ekstrand edited this page Jul 11, 2013
·
1 revision
Qualifier Matchers
Grapht matches qualifiers using qualifier matchers. These match the qualifier attached to a dependency, if any, and control whether certain binding rules are active. They also contribute to the ordering of binding rules: generally, a more-specific qualifier matcher takes precedence over a less-specific one.
The matchers, in increasing order of priority:
Default policy (matches unqualified dependencies and dependencies whose qualifiers are annotated with @AllowUnqualifiedMatch)
Any qualifier (including none)
Annotation type (matches all dependencies with qualifiers of a specified type)
Exact (matches all dependencies qualified with a specific annotation value; explicit no-qualifier matches are exact matches on the null qualifier)
For most qualifier annotations, there is no difference between 3 and 4. The difference becomes relevant with qualifier annotations that can take a value, such as @Named.