Package org.eclipse.sisu.space
Class WildcardKey
java.lang.Object
org.eclipse.sisu.space.WildcardKey
Binding
Key
for implementations that act as "wild-cards", meaning they match against any assignable type.
Since the wild-card type is Object
and the associated qualifier may not be unique between implementations,
the qualifier is saved and replaced with a unique (per-implementation) pseudo-qualifier. The original qualifier is
available by casting the pseudo-qualifier to Provider
and calling get()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static @interface
Qualifier
that captures a qualified implementation type.private static final class
Pseudo-Annotation
that can wrap any implementation type as aQualifier
. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.inject.Key<Object>
get
(Class<?> type, Annotation qualifier)
-
Field Details
-
OBJECT_TYPE_LITERAL
-
-
Constructor Details
-
WildcardKey
private WildcardKey()
-
-
Method Details
-
get
- Returns:
- Wildcard key for the given implementation type and qualifier
-