/** * Returns a new key of the specified type with the same annotation as this key. * * @since 3.0 */ public <T> Key<T> ofType(Class<T> type) { return new Key<T>(type, annotationStrategy); }
/** * Returns a new key of the specified type with the same annotation as this key. * * @since 3.0 */ public <T> Key<T> ofType(TypeLiteral<T> type) { return new Key<T>(type, annotationStrategy); }
/** * Returns a new key of the specified type with the same annotation as this key. * * @since 3.0 */ public Key<?> ofType(Type type) { return new Key<Object>(type, annotationStrategy); }
/** Gets a key for an injection type. */ public static <T> Key<T> get(Class<T> type) { return new Key<T>(type, NullAnnotationStrategy.INSTANCE); }
/** Gets a key for an injection type. */ public static <T> Key<T> get(TypeLiteral<T> typeLiteral) { return new Key<T>(typeLiteral, NullAnnotationStrategy.INSTANCE); }
/** Gets a key for an injection type and an annotation strategy. */ static <T> Key<T> get(Class<T> type, AnnotationStrategy annotationStrategy) { return new Key<T>(type, annotationStrategy); }
/** Gets a key for an injection type. */ public static Key<?> get(Type type) { return new Key<Object>(type, NullAnnotationStrategy.INSTANCE); }
/** * Returns this key without annotation attributes, i.e. with only the annotation type. * * @since 3.0 */ public Key<T> withoutAttributes() { return new Key<T>(typeLiteral, annotationStrategy.withoutAttributes()); }
/** Gets a key for an injection type and an annotation type. */ public static <T> Key<T> get( TypeLiteral<T> typeLiteral, Class<? extends Annotation> annotationType) { return new Key<T>(typeLiteral, strategyFor(annotationType)); }
/** Gets a key for an injection type and an annotation type. */ public static Key<?> get(Type type, Class<? extends Annotation> annotationType) { return new Key<Object>(type, strategyFor(annotationType)); }
/** Gets a key for an injection type and an annotation. */ public static Key<?> get(Type type, Annotation annotation) { return new Key<Object>(type, strategyFor(annotation)); }
/** Gets a key for an injection type and an annotation. */ public static <T> Key<T> get(Class<T> type, Annotation annotation) { return new Key<T>(type, strategyFor(annotation)); }
/** Gets a key for an injection type and an annotation type. */ public static <T> Key<T> get(Class<T> type, Class<? extends Annotation> annotationType) { return new Key<T>(type, strategyFor(annotationType)); }
/** Gets a key for an injection type and an annotation. */ public static <T> Key<T> get(TypeLiteral<T> typeLiteral, Annotation annotation) { return new Key<T>(typeLiteral, strategyFor(annotation)); }
/** * Returns a new key of the specified type with the same annotation as this key. * * @since 3.0 */ public <T> Key<T> ofType(TypeLiteral<T> type) { return new Key<T>(type, annotationStrategy); }
/** * Returns a new key of the specified type with the same annotation as this key. * * @since 3.0 */ public <T> Key<T> ofType(TypeLiteral<T> type) { return new Key<T>(type, annotationStrategy); }
/** * Returns a new key of the specified type with the same annotation as this * key. * * @since 3.0 */ public <T> Key<T> ofType(Class<T> type) { return new Key<T>(type, annotationStrategy); }
/** * Gets a key for an injection type and an annotation type. */ public static <T> Key<T> get(Class<T> type, Class<? extends Annotation> annotationType) { return new Key<T>(type, strategyFor(annotationType)); }
/** * Returns this key without annotation attributes, i.e. with only the annotation type. * * @since 3.0 */ public Key<T> withoutAttributes() { return new Key<T>(typeLiteral, annotationStrategy.withoutAttributes()); }
/** * Gets a key for an injection type and an annotation. */ public static Key<?> get(Type type, Annotation annotation) { return new Key<Object>(type, strategyFor(annotation)); }