Package org.eclipse.sisu.space
Class WildcardKey
- java.lang.Object
-
- org.eclipse.sisu.space.WildcardKey
-
final class WildcardKey extends java.lang.Object
BindingKey
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 toProvider
and callingget()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static interface
WildcardKey.Qualified
Qualifier
that captures a qualified implementation type.private static class
WildcardKey.QualifiedImpl
Pseudo-Annotation
that can wrap any implementation type as aQualifier
.
-
Field Summary
Fields Modifier and Type Field Description private static com.google.inject.TypeLiteral<java.lang.Object>
OBJECT_TYPE_LITERAL
-
Constructor Summary
Constructors Modifier Constructor Description private
WildcardKey()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.google.inject.Key<java.lang.Object>
get(java.lang.Class<?> type, java.lang.annotation.Annotation qualifier)
-