Uses of Class
com.google.inject.TypeLiteral
Packages that use TypeLiteral
Package
Description
Google Guice (pronounced "juice") is an ultra-lightweight dependency injection framework.
Extension for combining factory interfaces with injection; this extension requires
guice-assistedinject.jar.Interfaces which make up
Binder's expression language.Guice (sounds like "juice")
Extension for binding multiple instances in a collection; this extension requires
guice-multibindings.jar.Servlet API scopes, bindings and registration; this extension requires
guice-servlet.jar.Guice service provider interface
Extension for injecting objects that may throw at provision time; this extension requires
guice-throwingproviders.jar.-
Uses of TypeLiteral in com.google.inject
Fields in com.google.inject declared as TypeLiteralMethods in com.google.inject that return TypeLiteralModifier and TypeMethodDescription(package private) static TypeLiteral<?>TypeLiteral.fromSuperclassTypeParameter(Class<?> subclass) Gets type literal from super class's type parameter.static <T> TypeLiteral<T>Gets type literal for the givenClassinstance.static TypeLiteral<?>Gets type literal for the givenTypeinstance.TypeLiteral<?>TypeLiteral.getFieldType(Field field) Returns the resolved generic type offield.TypeLiteral<?>TypeLiteral.getReturnType(Method method) Returns the resolved generic return type ofmethod.TypeLiteral<?>TypeLiteral.getSupertype(Class<?> supertype) Returns the generic form ofsupertype.final TypeLiteral<T>Key.getTypeLiteral()Gets the key type.(package private) final TypeLiteral<Provider<T>>TypeLiteral.providerType()Gets the type of this type's provider.(package private) TypeLiteral<?>Resolves known type parameters intoResolveand returns the result.Methods in com.google.inject that return types with arguments of type TypeLiteralModifier and TypeMethodDescriptionMap<TypeLiteral<?>,List<InjectionPoint>> Injector.getAllMembersInjectorInjectionPoints()Returns the injection points created for calls toInjector.getMembersInjector(com.google.inject.TypeLiteral<T>)(either directly or indirectly, e.g.List<TypeLiteral<?>>TypeLiteral.getExceptionTypes(Member methodOrConstructor) Returns the resolved generic exception types thrown byconstructor.List<TypeLiteral<?>>TypeLiteral.getParameterTypes(Member methodOrConstructor) Returns the resolved generic parameter types ofmethodOrConstructor.private List<TypeLiteral<?>>TypeLiteral.resolveAll(Type[] types) Returns an immutable list of the resolved types.Methods in com.google.inject with parameters of type TypeLiteralModifier and TypeMethodDescriptionprotected <T> AnnotatedBindingBuilder<T>AbstractModule.bind(TypeLiteral<T> typeLiteral) <T> AnnotatedBindingBuilder<T>Binder.bind(TypeLiteral<T> typeLiteral) See the EDSL examples atBinder.protected final <T> AnnotatedBindingBuilder<T>PrivateModule.bind(TypeLiteral<T> typeLiteral) PrivateBinder.expose(TypeLiteral<?> type) Makes a binding fortypeavailable to the enclosing environment.protected final AnnotatedElementBuilderPrivateModule.expose(TypeLiteral<?> type) Makes a binding fortypeavailable to other modules and the injector.Injector.findBindingsByType(TypeLiteral<T> type) Returns all explicit bindings fortype.static <T> Key<T>Key.get(TypeLiteral<T> typeLiteral) Gets a key for an injection type.static <T> Key<T>Key.get(TypeLiteral<T> typeLiteral, Annotation annotation) Gets a key for an injection type and an annotation.static <T> Key<T>Key.get(TypeLiteral<T> typeLiteral, Class<? extends Annotation> annotationType) Gets a key for an injection type and an annotation type.protected <T> MembersInjector<T>AbstractModule.getMembersInjector(TypeLiteral<T> type) <T> MembersInjector<T>Binder.getMembersInjector(TypeLiteral<T> typeLiteral) Returns the members injector used to inject dependencies into methods and fields on instances of the given typeT.<T> MembersInjector<T>Injector.getMembersInjector(TypeLiteral<T> typeLiteral) Returns the members injector used to inject dependencies into methods and fields on instances of the given typeT.protected <T> MembersInjector<T>PrivateModule.getMembersInjector(TypeLiteral<T> type) <T> Key<T>Key.ofType(TypeLiteral<T> type) Returns a new key of the specified type with the same annotation as this key.<T> voidBinder.requestInjection(TypeLiteral<T> type, T instance) Upon successful creation, theInjectorwill inject instance fields and methods of the given object.Method parameters in com.google.inject with type arguments of type TypeLiteralModifier and TypeMethodDescriptionprotected voidAbstractModule.bindListener(Matcher<? super TypeLiteral<?>> typeMatcher, TypeListener listener) voidBinder.bindListener(Matcher<? super TypeLiteral<?>> typeMatcher, TypeListener listener) Registers a listener for injectable types.protected voidPrivateModule.bindListener(Matcher<? super TypeLiteral<?>> typeMatcher, TypeListener listener) protected voidAbstractModule.convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter converter) voidBinder.convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter converter) Binds a type converter.protected final voidPrivateModule.convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter converter) Constructors in com.google.inject with parameters of type TypeLiteralModifierConstructorDescriptionprivateKey(TypeLiteral<T> typeLiteral, Key.AnnotationStrategy annotationStrategy) Constructs a key from a manually specified type. -
Uses of TypeLiteral in com.google.inject.assistedinject
Fields in com.google.inject.assistedinject declared as TypeLiteralModifier and TypeFieldDescriptionprivate final TypeLiteral<F>FactoryProvider.factoryTypeDeprecated.private final TypeLiteral<?>FactoryProvider.implementationTypeDeprecated.(package private) final TypeLiteral<?>FactoryProvider2.AssistData.implementationTypethe type of the implementation constructedFields in com.google.inject.assistedinject with type parameters of type TypeLiteralModifier and TypeFieldDescriptionprivate final Map<Key<?>,TypeLiteral<?>> BindingCollector.bindingsMethods in com.google.inject.assistedinject that return TypeLiteralModifier and TypeMethodDescriptionTypeLiteral<?>AssistedMethod.getImplementationType()Returns the implementation type that will be created when the method is used.TypeLiteral<?>FactoryProvider2.AssistData.getImplementationType()Methods in com.google.inject.assistedinject that return types with arguments of type TypeLiteralMethods in com.google.inject.assistedinject with parameters of type TypeLiteralModifier and TypeMethodDescriptionBindingCollector.addBinding(Key<?> key, TypeLiteral<?> target) <F> ModuleFactoryModuleBuilder.build(TypeLiteral<F> factoryInterface) See the factory configuration examples atFactoryModuleBuilder.private booleanFactoryProvider2.constructorHasMatchingParams(TypeLiteral<?> type, Constructor<?> constructor, List<Key<?>> paramList, Errors errors) Matching logic for constructors annotated with AssistedInject.private static Map<Method,AssistedConstructor<?>> FactoryProvider.createMethodMapping(TypeLiteral<?> factoryType, TypeLiteral<?> implementationType) Deprecated.private <T> InjectionPointFactoryProvider2.findMatchingConstructorInjectionPoint(Method method, Key<?> returnType, TypeLiteral<T> implementation, List<Key<?>> paramList) Finds a constructor suitable for the method.private Set<Dependency<?>>FactoryProvider2.getDependencies(InjectionPoint ctorPoint, TypeLiteral<?> implementation) Calculates all dependencies required by the implementation and constructor.FactoryModuleBuilder.implement(Key<T> source, TypeLiteral<? extends T> target) See the factory configuration examples atFactoryModuleBuilder.FactoryModuleBuilder.implement(TypeLiteral<T> source, TypeLiteral<? extends T> target) See the factory configuration examples atFactoryModuleBuilder.FactoryModuleBuilder.implement(TypeLiteral<T> source, Annotation annotation, TypeLiteral<? extends T> target) See the factory configuration examples atFactoryModuleBuilder.FactoryModuleBuilder.implement(TypeLiteral<T> source, Annotation annotation, Class<? extends T> target) See the factory configuration examples atFactoryModuleBuilder.FactoryModuleBuilder.implement(TypeLiteral<T> source, Class<? extends Annotation> annotationType, TypeLiteral<? extends T> target) See the factory configuration examples atFactoryModuleBuilder.FactoryModuleBuilder.implement(TypeLiteral<T> source, Class<? extends Annotation> annotationType, Class<? extends T> target) See the factory configuration examples atFactoryModuleBuilder.FactoryModuleBuilder.implement(TypeLiteral<T> source, Class<? extends T> target) See the factory configuration examples atFactoryModuleBuilder.FactoryModuleBuilder.implement(Class<T> source, TypeLiteral<? extends T> target) See the factory configuration examples atFactoryModuleBuilder.FactoryModuleBuilder.implement(Class<T> source, Annotation annotation, TypeLiteral<? extends T> target) See the factory configuration examples atFactoryModuleBuilder.FactoryModuleBuilder.implement(Class<T> source, Class<? extends Annotation> annotationType, TypeLiteral<? extends T> target) See the factory configuration examples atFactoryModuleBuilder.private booleanFactoryProvider2.isTypeNotSpecified(TypeLiteral<?> typeLiteral, ConfigurationException ce) Returns true if the ConfigurationException is due to an error of TypeLiteral not being fully specified.private booleanFactoryProvider2.isValidForOptimizedAssistedInject(Set<Dependency<?>> dependencies, Class<?> implementation, TypeLiteral<?> factoryType) Returns true if all dependencies are suitable for the optimized version of AssistedInject.static <F> Provider<F>FactoryProvider.newFactory(TypeLiteral<F> factoryType, TypeLiteral<?> implementationType) Deprecated.Method parameters in com.google.inject.assistedinject with type arguments of type TypeLiteralModifier and TypeMethodDescriptionstatic <T> AssistedConstructor<T>AssistedConstructor.create(Constructor<T> constructor, List<TypeLiteral<?>> parameterTypes) Constructors in com.google.inject.assistedinject with parameters of type TypeLiteralModifierConstructorDescription(package private)AssistData(Constructor<?> constructor, Key<?> returnType, com.google.common.collect.ImmutableList<Key<?>> paramTypes, TypeLiteral<?> implementationType, Method factoryMethod, Set<Dependency<?>> dependencies, boolean optimized, List<FactoryProvider2.ThreadLocalProvider> providers) privateFactoryProvider(TypeLiteral<F> factoryType, TypeLiteral<?> implementationType, Map<Method, AssistedConstructor<?>> factoryMethodToConstructor) Deprecated.Constructor parameters in com.google.inject.assistedinject with type arguments of type TypeLiteralModifierConstructorDescriptionprivateAssistedConstructor(Constructor<T> constructor, List<TypeLiteral<?>> parameterTypes) -
Uses of TypeLiteral in com.google.inject.binder
Methods in com.google.inject.binder with parameters of type TypeLiteralModifier and TypeMethodDescriptionLinkedBindingBuilder.to(TypeLiteral<? extends T> implementation) See the EDSL examples atBinder.<S extends T>
ScopedBindingBuilderLinkedBindingBuilder.toConstructor(Constructor<S> constructor, TypeLiteral<? extends S> type) See the EDSL examples atBinder.LinkedBindingBuilder.toProvider(TypeLiteral<? extends javax.inject.Provider<? extends T>> providerType) See the EDSL examples atBinder. -
Uses of TypeLiteral in com.google.inject.internal
Fields in com.google.inject.internal declared as TypeLiteralModifier and TypeFieldDescriptionprivate final TypeLiteral<T>RealMultibinder.BindingSelection.elementTypeprivate final TypeLiteral<K>RealMapBinder.BindingSelection.keyTypestatic final TypeLiteral<String>InjectorImpl.STRING_TYPE(package private) final TypeLiteral<T>ProvidesMethodScanner.TypeAndValue.type(package private) final TypeLiteral<?>Indexer.IndexedBinding.typeLiteralprivate final TypeLiteral<T>MembersInjectorImpl.typeLiteralprivate final TypeLiteral<?>ProviderMethodsModule.typeLiteralprivate final TypeLiteral<V>RealMapBinder.BindingSelection.valueTypeFields in com.google.inject.internal with type parameters of type TypeLiteralModifier and TypeFieldDescription(package private) final com.google.common.collect.ListMultimap<TypeLiteral<?>,Binding<?>> InjectorImpl.bindingsMultimapprivate final FailableCache<TypeLiteral<?>,MembersInjectorImpl<?>> MembersInjectorStore.cacheprivate static final com.google.common.collect.ImmutableMap<TypeLiteral<?>,TypeLiteral<?>> MoreTypes.PRIMITIVE_TO_WRAPPERprivate static final com.google.common.collect.ImmutableMap<TypeLiteral<?>,TypeLiteral<?>> MoreTypes.PRIMITIVE_TO_WRAPPER(package private) final Set<TypeLiteral<?>>InjectorImpl.userRequestedMembersInjectorTypesThe set of types passed toInjectorImpl.getMembersInjector(com.google.inject.TypeLiteral<T>)andInjectorImpl.injectMembers(java.lang.Object).Methods in com.google.inject.internal that return TypeLiteralModifier and TypeMethodDescriptionstatic <T> TypeLiteral<T>MoreTypes.canonicalizeForKey(TypeLiteral<T> typeLiteral) Returns an type that's appropriate for use in a key.(package private) static <T> TypeLiteral<Collection<javax.inject.Provider<T>>>RealMultibinder.collectionOfJavaxProvidersOf(TypeLiteral<T> elementType) (package private) static <T> TypeLiteral<Collection<Provider<T>>>RealMultibinder.collectionOfProvidersOf(TypeLiteral<T> elementType) (package private) static <K,V> TypeLiteral<Map.Entry<K, Provider<V>>> RealMapBinder.entryOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) (package private) static <K,V> TypeLiteral<Map.Entry<K, Provider<V>>> RealMapBinder.entryOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) (package private) TypeLiteral<T>RealMultibinder.BindingSelection.getElementTypeLiteral()(package private) TypeLiteral<T>RealMultibinder.getElementTypeLiteral()TypeLiteral<?>RealMultibinder.RealMultibinderProvider.getElementTypeLiteral()private TypeLiteral<K>RealMapBinder.BindingSelection.getKeyType()RealMapBinder.RealMapProvider.getKeyTypeLiteral()private TypeLiteral<V>RealMapBinder.BindingSelection.getValueType()RealMapBinder.RealMapProvider.getValueTypeLiteral()(package private) static <T> TypeLiteral<Optional<T>>RealOptionalBinder.javaOptionalOf(TypeLiteral<T> type) (package private) static <T> TypeLiteral<Optional<javax.inject.Provider<T>>>RealOptionalBinder.javaOptionalOfJavaxProvider(TypeLiteral<T> type) (package private) static <T> TypeLiteral<Optional<Provider<T>>>RealOptionalBinder.javaOptionalOfProvider(TypeLiteral<T> type) (package private) static <K,V> TypeLiteral<Map<K, V>> RealMapBinder.mapOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) (package private) static <K,V> TypeLiteral<Map<K, Collection<javax.inject.Provider<V>>>> RealMapBinder.mapOfCollectionOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) (package private) static <K,V> TypeLiteral<Map<K, Collection<Provider<V>>>> RealMapBinder.mapOfCollectionOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) (package private) static <K,V> TypeLiteral<Map<K, javax.inject.Provider<V>>> RealMapBinder.mapOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) (package private) static <K,V> TypeLiteral<Map<K, Provider<V>>> RealMapBinder.mapOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) (package private) static <K,V> TypeLiteral<Map<K, Set<javax.inject.Provider<V>>>> RealMapBinder.mapOfSetOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) (package private) static <K,V> TypeLiteral<Map<K, Set<Provider<V>>>> RealMapBinder.mapOfSetOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) (package private) static <T> TypeLiteral<com.google.common.base.Optional<T>>RealOptionalBinder.optionalOf(TypeLiteral<T> type) (package private) static <T> TypeLiteral<com.google.common.base.Optional<javax.inject.Provider<T>>>RealOptionalBinder.optionalOfJavaxProvider(TypeLiteral<T> type) (package private) static <T> TypeLiteral<com.google.common.base.Optional<Provider<T>>>RealOptionalBinder.optionalOfProvider(TypeLiteral<T> type) (package private) static <T> TypeLiteral<Set<T>>RealMultibinder.setOf(TypeLiteral<T> elementType) (package private) static <K,V> TypeLiteral<Set<Map.Entry<K, javax.inject.Provider<V>>>> RealMapBinder.setOfEntryOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) Methods in com.google.inject.internal that return types with arguments of type TypeLiteralModifier and TypeMethodDescriptionprivate <T> BindingImpl<TypeLiteral<T>>InjectorImpl.createTypeLiteralBinding(Key<TypeLiteral<T>> key, Errors errors) Converts a binding for aKey<TypeLiteral<T>>to the valueTypeLiteral<T>.(package private) com.google.common.collect.ImmutableListMultimap<TypeLiteral<?>,InjectionPoint> MembersInjectorStore.getAllInjectionPoints()Map<TypeLiteral<?>,List<InjectionPoint>> InjectorImpl.getAllMembersInjectorInjectionPoints()Map<TypeLiteral<?>,List<InjectionPoint>> InternalInjectorCreator.ToolStageInjector.getAllMembersInjectorInjectionPoints()Methods in com.google.inject.internal with parameters of type TypeLiteralModifier and TypeMethodDescriptionErrors.ambiguousTypeConversion(String stringValue, Object source, TypeLiteral<?> type, TypeConverterBinding a, TypeConverterBinding b) static <T> TypeLiteral<T>MoreTypes.canonicalizeForKey(TypeLiteral<T> typeLiteral) Returns an type that's appropriate for use in a key.(package private) static <T> TypeLiteral<Collection<javax.inject.Provider<T>>>RealMultibinder.collectionOfJavaxProvidersOf(TypeLiteral<T> elementType) (package private) static <T> TypeLiteral<Collection<Provider<T>>>RealMultibinder.collectionOfProvidersOf(TypeLiteral<T> elementType) Errors.constructorNotDefinedByType(Constructor<?> constructor, TypeLiteral<?> type) Errors.conversionError(String stringValue, Object source, TypeLiteral<?> type, TypeConverterBinding typeConverterBinding, RuntimeException cause) Errors.conversionTypeError(String stringValue, Object source, TypeLiteral<?> type, TypeConverterBinding typeConverterBinding, Object converted) Errors.converterReturnedNull(String stringValue, Object source, TypeLiteral<?> type, TypeConverterBinding typeConverterBinding) private <T> MembersInjectorImpl<T>MembersInjectorStore.createWithListeners(TypeLiteral<T> type, Errors errors) Creates a new members injector and attaches both injection listeners and method aspects.(package private) static <K,V> TypeLiteral<Map.Entry<K, Provider<V>>> RealMapBinder.entryOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) (package private) static <K,V> TypeLiteral<Map.Entry<K, Provider<V>>> RealMapBinder.entryOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) static InternalProvisionExceptionInternalProvisionException.errorInUserInjector(MembersInjector<?> listener, TypeLiteral<?> type, RuntimeException cause) static InternalProvisionExceptionInternalProvisionException.errorNotifyingInjectionListener(InjectionListener<?> listener, TypeLiteral<?> type, RuntimeException cause) Errors.errorNotifyingTypeListener(TypeListenerBinding listener, TypeLiteral<?> type, Throwable cause) InjectorImpl.findBindingsByType(TypeLiteral<T> type) InternalInjectorCreator.ToolStageInjector.findBindingsByType(TypeLiteral<T> type) <T> MembersInjectorImpl<T>MembersInjectorStore.get(TypeLiteral<T> key, Errors errors) Returns a new complete members injector with injection listeners registered.InheritingState.getConverter(String stringValue, TypeLiteral<?> type, Errors errors, Object source) State.getConverter(String stringValue, TypeLiteral<?> type, Errors errors, Object source) Returns the matching converter fortype, or null if none match.static Key<?>Annotations.getKey(TypeLiteral<?> type, Member member, Annotation[] annotations, Errors errors) Gets a key for the given type, member and annotations.(package private) <T> Key<T>ProviderMethodsModule.getKey(Errors errors, TypeLiteral<T> type, Member member, Annotation[] annotations) <T> MembersInjector<T>DeferredLookups.getMembersInjector(TypeLiteral<T> type) <T> MembersInjector<T>EncounterImpl.getMembersInjector(TypeLiteral<T> typeLiteral) <T> MembersInjector<T>InjectorImpl.getMembersInjector(TypeLiteral<T> typeLiteral) <T> MembersInjector<T>InternalInjectorCreator.ToolStageInjector.getMembersInjector(TypeLiteral<T> typeLiteral) <T> MembersInjector<T>Lookups.getMembersInjector(TypeLiteral<T> type) (package private) static <T> TypeLiteral<Optional<T>>RealOptionalBinder.javaOptionalOf(TypeLiteral<T> type) (package private) static <T> TypeLiteral<Optional<javax.inject.Provider<T>>>RealOptionalBinder.javaOptionalOfJavaxProvider(TypeLiteral<T> type) (package private) static <T> TypeLiteral<Optional<Provider<T>>>RealOptionalBinder.javaOptionalOfProvider(TypeLiteral<T> type) Errors.keyNotFullySpecified(TypeLiteral<?> typeLiteral) (package private) static <K,V> TypeLiteral<Map<K, V>> RealMapBinder.mapOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) (package private) static <K,V> TypeLiteral<Map<K, Collection<javax.inject.Provider<V>>>> RealMapBinder.mapOfCollectionOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) (package private) static <K,V> TypeLiteral<Map<K, Collection<Provider<V>>>> RealMapBinder.mapOfCollectionOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) (package private) static <K,V> TypeLiteral<Map<K, javax.inject.Provider<V>>> RealMapBinder.mapOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) (package private) static <K,V> TypeLiteral<Map<K, Provider<V>>> RealMapBinder.mapOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) (package private) static <K,V> TypeLiteral<Map<K, Set<javax.inject.Provider<V>>>> RealMapBinder.mapOfSetOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) (package private) static <K,V> TypeLiteral<Map<K, Set<Provider<V>>>> RealMapBinder.mapOfSetOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) Errors.missingConstructor(TypeLiteral<?> type) static <K,V> RealMapBinder<K, V> RealMapBinder.newMapRealBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType) Returns a new mapbinder that collects entries ofkeyType/valueTypein aMapthat is itself bound with no binding annotation.(package private) static <K,V> RealMapBinder<K, V> RealMapBinder.newRealMapBinder(Binder binder, TypeLiteral<K> keyType, Key<V> valueTypeAndAnnotation) private static <K,V> RealMapBinder<K, V> RealMapBinder.newRealMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, Key<Map<K, V>> mapKey, RealMultibinder<Map.Entry<K, Provider<V>>> entrySetBinder) static <K,V> RealMapBinder<K, V> RealMapBinder.newRealMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, Annotation annotation) Returns a new mapbinder that collects entries ofkeyType/valueTypein aMapthat is itself bound withannotation.static <K,V> RealMapBinder<K, V> RealMapBinder.newRealMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, Class<? extends Annotation> annotationType) Returns a new mapbinder that collects entries ofkeyType/valueTypein aMapthat is itself bound withannotationType.(package private) static <T> TypeLiteral<com.google.common.base.Optional<T>>RealOptionalBinder.optionalOf(TypeLiteral<T> type) (package private) static <T> TypeLiteral<com.google.common.base.Optional<javax.inject.Provider<T>>>RealOptionalBinder.optionalOfJavaxProvider(TypeLiteral<T> type) (package private) static <T> TypeLiteral<com.google.common.base.Optional<Provider<T>>>RealOptionalBinder.optionalOfProvider(TypeLiteral<T> type) (package private) booleanMembersInjectorStore.remove(TypeLiteral<?> type) Purges a type literal from the cache.(package private) static <T> TypeLiteral<Set<T>>RealMultibinder.setOf(TypeLiteral<T> elementType) (package private) static <K,V> TypeLiteral<Set<Map.Entry<K, javax.inject.Provider<V>>>> RealMapBinder.setOfEntryOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType) BindingBuilder.to(TypeLiteral<? extends T> implementation) <S extends T>
ScopedBindingBuilderBindingBuilder.toConstructor(Constructor<S> constructor, TypeLiteral<? extends S> type) BindingBuilder.toProvider(TypeLiteral<? extends javax.inject.Provider<? extends T>> providerType) Method parameters in com.google.inject.internal with type arguments of type TypeLiteralModifier and TypeMethodDescriptionprivate <T> BindingImpl<TypeLiteral<T>>InjectorImpl.createTypeLiteralBinding(Key<TypeLiteral<T>> key, Errors errors) Converts a binding for aKey<TypeLiteral<T>>to the valueTypeLiteral<T>.private static voidTypeConverterBindingProcessor.internalConvertToTypes(InjectorImpl injector, Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter converter) Constructors in com.google.inject.internal with parameters of type TypeLiteralModifierConstructorDescriptionprivateBindingSelection(TypeLiteral<K> keyType, TypeLiteral<V> valueType, Key<Map<K, V>> mapKey, RealMultibinder<Map.Entry<K, Provider<V>>> entrySetBinder) (package private)MembersInjectorImpl(InjectorImpl injector, TypeLiteral<T> typeLiteral, EncounterImpl<T> encounter, com.google.common.collect.ImmutableList<SingleMemberInjector> memberInjectors) privateRealMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, Key<Map<K, V>> mapKey, RealMultibinder<Map.Entry<K, Provider<V>>> entrySetBinder) (package private)Signature(TypeLiteral<?> typeLiteral, Method method) (package private)TypeAndValue(TypeLiteral<T> type, T value) -
Uses of TypeLiteral in com.google.inject.multibindings
Methods in com.google.inject.multibindings that return TypeLiteralModifier and TypeMethodDescriptionTypeLiteral<?>MultibinderBinding.getElementTypeLiteral()Returns the TypeLiteral that describes the type of elements in the set.TypeLiteral<?>MapBinderBinding.getKeyTypeLiteral()Returns the TypeLiteral describing the keys of the map.TypeLiteral<?>MapBinderBinding.getValueTypeLiteral()Returns the TypeLiteral describing the values of the map.Methods in com.google.inject.multibindings with parameters of type TypeLiteralModifier and TypeMethodDescriptionstatic <K,V> MapBinder<K, V> MapBinder.newMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType) Returns a new mapbinder that collects entries ofkeyType/valueTypein aMapthat is itself bound with no binding annotation.static <K,V> MapBinder<K, V> MapBinder.newMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, Annotation annotation) Returns a new mapbinder that collects entries ofkeyType/valueTypein aMapthat is itself bound withannotation.static <K,V> MapBinder<K, V> MapBinder.newMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, Class<? extends Annotation> annotationType) Returns a new mapbinder that collects entries ofkeyType/valueTypein aMapthat is itself bound withannotationType.static <T> OptionalBinder<T>OptionalBinder.newOptionalBinder(Binder binder, TypeLiteral<T> type) static <T> Multibinder<T>Multibinder.newSetBinder(Binder binder, TypeLiteral<T> type) Returns a new multibinder that collects instances oftypein aSetthat is itself bound with no binding annotation.static <T> Multibinder<T>Multibinder.newSetBinder(Binder binder, TypeLiteral<T> type, Annotation annotation) Returns a new multibinder that collects instances oftypein aSetthat is itself bound withannotation.static <T> Multibinder<T>Multibinder.newSetBinder(Binder binder, TypeLiteral<T> type, Class<? extends Annotation> annotationType) Returns a new multibinder that collects instances oftypein aSetthat is itself bound withannotationType. -
Uses of TypeLiteral in com.google.inject.servlet
Fields in com.google.inject.servlet declared as TypeLiteralModifier and TypeFieldDescriptionprivate static final TypeLiteral<FilterDefinition>ManagedFilterPipeline.FILTER_DEFSprivate static final TypeLiteral<ServletDefinition>ManagedServletPipeline.SERVLET_DEFS -
Uses of TypeLiteral in com.google.inject.spi
Fields in com.google.inject.spi declared as TypeLiteralModifier and TypeFieldDescriptionprivate final TypeLiteral<?>InjectionPoint.declaringType(package private) final TypeLiteral<?>InjectionPoint.InjectableMember.declaringTypeprivate final TypeLiteral<T>InjectionRequest.typeprivate final TypeLiteral<T>MembersInjectorLookup.typeFields in com.google.inject.spi with type parameters of type TypeLiteralModifier and TypeFieldDescriptionprivate final Matcher<? super TypeLiteral<?>>TypeConverterBinding.typeMatcherprivate final Matcher<? super TypeLiteral<?>>TypeListenerBinding.typeMatcherMethods in com.google.inject.spi that return TypeLiteralModifier and TypeMethodDescriptionTypeLiteral<?>InjectionPoint.getDeclaringType()Returns the generic type that defines this injection point.InjectionRequest.getType()MembersInjectorLookup.getType()Gets the type containing the members to be injected.Methods in com.google.inject.spi that return types with arguments of type TypeLiteralModifier and TypeMethodDescriptionMatcher<? super TypeLiteral<?>>TypeConverterBinding.getTypeMatcher()Matcher<? super TypeLiteral<?>>TypeListenerBinding.getTypeMatcher()Returns the type matcher which chooses which types the listener should be notified of.private static List<TypeLiteral<?>>InjectionPoint.hierarchyFor(TypeLiteral<?> type) Methods in com.google.inject.spi with parameters of type TypeLiteralModifier and TypeMethodDescription<T> AnnotatedBindingBuilder<T>Elements.RecordingBinder.bind(TypeLiteral<T> typeLiteral) TypeConverter.convert(String value, TypeLiteral<?> toType) Converts a string value.Elements.RecordingBinder.expose(TypeLiteral<?> type) static <T> InjectionPointInjectionPoint.forConstructor(Constructor<T> constructor, TypeLiteral<? extends T> type) Returns a new injection point for the specified constructor oftype.static InjectionPointInjectionPoint.forConstructorOf(TypeLiteral<?> type) Returns a new injection point for the injectable constructor oftype.static Set<InjectionPoint>InjectionPoint.forInstanceMethodsAndFields(TypeLiteral<?> type) Returns all instance method and field injection points ontype.private com.google.common.collect.ImmutableList<Dependency<?>>InjectionPoint.forMember(Member member, TypeLiteral<?> type, Annotation[][] paramterAnnotations) static <T> InjectionPointInjectionPoint.forMethod(Method method, TypeLiteral<T> type) Returns a new injection point for the specified method oftype.static Set<InjectionPoint>InjectionPoint.forStaticMethodsAndFields(TypeLiteral<?> type) Returns all static method and field injection points ontype.private static Field[]InjectionPoint.getDeclaredFields(TypeLiteral<?> type) private static Method[]InjectionPoint.getDeclaredMethods(TypeLiteral<?> type) private static Set<InjectionPoint>InjectionPoint.getInjectionPoints(TypeLiteral<?> type, boolean statics, Errors errors) Returns an ordered, immutable set of injection points for the given type.<T> MembersInjector<T>Elements.RecordingBinder.getMembersInjector(TypeLiteral<T> typeLiteral) <T> MembersInjector<T>TypeEncounter.getMembersInjector(TypeLiteral<T> typeLiteral) Returns the members injector used to inject dependencies into methods and fields on instances of the given typeT.<I> voidTypeListener.hear(TypeLiteral<I> type, TypeEncounter<I> encounter) Invoked when Guice encounters a new type eligible for constructor or members injection.private static List<TypeLiteral<?>>InjectionPoint.hierarchyFor(TypeLiteral<?> type) <T> voidElements.RecordingBinder.requestInjection(TypeLiteral<T> type, T instance) Method parameters in com.google.inject.spi with type arguments of type TypeLiteralModifier and TypeMethodDescriptionvoidElements.RecordingBinder.bindListener(Matcher<? super TypeLiteral<?>> typeMatcher, TypeListener listener) voidElements.RecordingBinder.convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter converter) Constructors in com.google.inject.spi with parameters of type TypeLiteralModifierConstructorDescription(package private)InjectableField(TypeLiteral<?> declaringType, Field field, Annotation atInject) (package private)InjectableMember(TypeLiteral<?> declaringType, Annotation atInject) (package private)InjectableMethod(TypeLiteral<?> declaringType, Method method, Annotation atInject) (package private)InjectionPoint(TypeLiteral<?> declaringType, Constructor<?> constructor) (package private)InjectionPoint(TypeLiteral<?> declaringType, Field field, boolean optional) (package private)InjectionPoint(TypeLiteral<?> declaringType, Method method, boolean optional) InjectionRequest(Object source, TypeLiteral<T> type, T instance) MembersInjectorLookup(Object source, TypeLiteral<T> type) Constructor parameters in com.google.inject.spi with type arguments of type TypeLiteralModifierConstructorDescriptionTypeConverterBinding(Object source, Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter typeConverter) (package private)TypeListenerBinding(Object source, TypeListener listener, Matcher<? super TypeLiteral<?>> typeMatcher) -
Uses of TypeLiteral in com.google.inject.throwingproviders
Fields in com.google.inject.throwingproviders declared as TypeLiteralModifier and TypeFieldDescriptionprivate static final TypeLiteral<CheckedProviderMethod<?>>ThrowingProviderBinder.CHECKED_PROVIDER_METHOD_TYPEprivate static final TypeLiteral<CheckedProvider<?>>ThrowingProviderBinder.CHECKED_PROVIDER_TYPEprivate final TypeLiteral<?>CheckedProviderMethodsModule.typeLiteralFields in com.google.inject.throwingproviders with type parameters of type TypeLiteralModifier and TypeFieldDescriptionprivate final List<TypeLiteral<?>>CheckedProviderMethod.exceptionTypesMethods in com.google.inject.throwingproviders with parameters of type TypeLiteralModifier and TypeMethodDescription<P extends CheckedProvider,T>
ThrowingProviderBinder.SecondaryBinder<P,T> ThrowingProviderBinder.bind(Class<P> interfaceType, TypeLiteral<T> typeLiteral) (package private) static <T> Constructor<? extends T>CheckedProvideUtils.findThrowingConstructor(TypeLiteral<? extends T> typeLiteral, Binder binder) private static <T,P extends CheckedProvider<? super T>>
PCheckedProviders.generateProvider(TypeLiteral<P> providerType, com.google.common.base.Optional<T> value, InvocationHandler handler) (package private) <T> Key<T>CheckedProviderMethodsModule.getKey(Errors errors, TypeLiteral<T> type, Member member, Annotation[] annotations) static <T,P extends CheckedProvider<? super T>>
PCheckedProviders.of(TypeLiteral<P> providerType, T instance) Returns aCheckedProviderwhich always providesinstance.ThrowingProviderBinder.SecondaryBinder.providing(TypeLiteral<? extends T> cxtorLiteral) static <T,P extends CheckedProvider<? super T>>
PCheckedProviders.throwing(TypeLiteral<P> providerType, Class<? extends Throwable> throwable) Returns aCheckedProviderwhich always throws exceptions.Method parameters in com.google.inject.throwingproviders with type arguments of type TypeLiteralModifier and TypeMethodDescription(package private) static voidCheckedProvideUtils.validateExceptions(Binder binder, Iterable<TypeLiteral<?>> actualExceptionTypes, Iterable<Class<? extends Throwable>> expectedExceptionTypes, Class<? extends CheckedProvider> checkedProvider) Adds errors to the binder if the exceptions aren't valid.