Uses of Class
com.google.inject.TypeLiteral
-
Packages that use TypeLiteral Package Description com.google.inject Google Guice (pronounced "juice") is an ultra-lightweight dependency injection framework.com.google.inject.assistedinject Extension for combining factory interfaces with injection; this extension requiresguice-assistedinject.jar
.com.google.inject.binder Interfaces which make upBinder
's expression language.com.google.inject.internal Guice (sounds like "juice")com.google.inject.multibindings Extension for binding multiple instances in a collection; this extension requiresguice-multibindings.jar
.com.google.inject.servlet Servlet API scopes, bindings and registration; this extension requiresguice-servlet.jar
.com.google.inject.spi Guice service provider interfacecom.google.inject.throwingproviders Extension for injecting objects that may throw at provision time; this extension requiresguice-throwingproviders.jar
. -
-
Uses of TypeLiteral in com.google.inject
Fields in com.google.inject declared as TypeLiteral Modifier and Type Field Description private TypeLiteral<T>
Key. typeLiteral
Methods in com.google.inject that return TypeLiteral Modifier and Type Method Description (package private) static TypeLiteral<?>
TypeLiteral. fromSuperclassTypeParameter(java.lang.Class<?> subclass)
Gets type literal from super class's type parameter.static <T> TypeLiteral<T>
TypeLiteral. get(java.lang.Class<T> type)
Gets type literal for the givenClass
instance.static TypeLiteral<?>
TypeLiteral. get(java.lang.reflect.Type type)
Gets type literal for the givenType
instance.TypeLiteral<?>
TypeLiteral. getFieldType(java.lang.reflect.Field field)
Returns the resolved generic type offield
.TypeLiteral<?>
TypeLiteral. getReturnType(java.lang.reflect.Method method)
Returns the resolved generic return type ofmethod
.TypeLiteral<?>
TypeLiteral. getSupertype(java.lang.Class<?> supertype)
Returns the generic form ofsupertype
.TypeLiteral<T>
Key. getTypeLiteral()
Gets the key type.(package private) TypeLiteral<Provider<T>>
TypeLiteral. providerType()
Gets the type of this type's provider.(package private) TypeLiteral<?>
TypeLiteral. resolve(java.lang.reflect.Type toResolve)
Resolves known type parameters intoResolve
and returns the result.Methods in com.google.inject that return types with arguments of type TypeLiteral Modifier and Type Method Description java.util.List<TypeLiteral<?>>
TypeLiteral. getExceptionTypes(java.lang.reflect.Member methodOrConstructor)
Returns the resolved generic exception types thrown byconstructor
.java.util.List<TypeLiteral<?>>
TypeLiteral. getParameterTypes(java.lang.reflect.Member methodOrConstructor)
Returns the resolved generic parameter types ofmethodOrConstructor
.private java.util.List<TypeLiteral<?>>
TypeLiteral. resolveAll(java.lang.reflect.Type[] types)
Returns an immutable list of the resolved types.Methods in com.google.inject with parameters of type TypeLiteral Modifier and Type Method Description protected <T> AnnotatedBindingBuilder<T>
AbstractModule. bind(TypeLiteral<T> typeLiteral)
<T> AnnotatedBindingBuilder<T>
Binder. bind(TypeLiteral<T> typeLiteral)
See the EDSL examples atBinder
.protected <T> AnnotatedBindingBuilder<T>
PrivateModule. bind(TypeLiteral<T> typeLiteral)
AnnotatedElementBuilder
PrivateBinder. expose(TypeLiteral<?> type)
Makes a binding fortype
available to the enclosing environment.protected AnnotatedElementBuilder
PrivateModule. expose(TypeLiteral<?> type)
Makes a binding fortype
available to other modules and the injector.<T> java.util.List<Binding<T>>
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, java.lang.annotation.Annotation annotation)
Gets a key for an injection type and an annotation.static <T> Key<T>
Key. get(TypeLiteral<T> typeLiteral, java.lang.Class<? extends java.lang.annotation.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> void
Binder. requestInjection(TypeLiteral<T> type, T instance)
Upon successful creation, theInjector
will inject instance fields and methods of the given object.Method parameters in com.google.inject with type arguments of type TypeLiteral Modifier and Type Method Description protected void
AbstractModule. bindListener(Matcher<? super TypeLiteral<?>> typeMatcher, TypeListener listener)
void
Binder. bindListener(Matcher<? super TypeLiteral<?>> typeMatcher, TypeListener listener)
Registers a listener for injectable types.protected void
PrivateModule. bindListener(Matcher<? super TypeLiteral<?>> typeMatcher, TypeListener listener)
protected void
AbstractModule. convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter converter)
void
Binder. convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter converter)
Binds a type converter.protected void
PrivateModule. convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter converter)
Constructors in com.google.inject with parameters of type TypeLiteral Constructor Description Key(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 TypeLiteral Modifier and Type Field Description private TypeLiteral<F>
FactoryProvider. factoryType
Deprecated.private TypeLiteral<?>
FactoryProvider. implementationType
Deprecated.(package private) TypeLiteral<?>
FactoryProvider2.AssistData. implementationType
the type of the implementation constructedFields in com.google.inject.assistedinject with type parameters of type TypeLiteral Modifier and Type Field Description private java.util.Map<Key<?>,TypeLiteral<?>>
BindingCollector. bindings
Methods in com.google.inject.assistedinject that return TypeLiteral Modifier and Type Method Description TypeLiteral<?>
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 TypeLiteral Modifier and Type Method Description java.util.Map<Key<?>,TypeLiteral<?>>
BindingCollector. getBindings()
Methods in com.google.inject.assistedinject with parameters of type TypeLiteral Modifier and Type Method Description BindingCollector
BindingCollector. addBinding(Key<?> key, TypeLiteral<?> target)
<F> Module
FactoryModuleBuilder. build(TypeLiteral<F> factoryInterface)
See the factory configuration examples atFactoryModuleBuilder
.private boolean
FactoryProvider2. constructorHasMatchingParams(TypeLiteral<?> type, java.lang.reflect.Constructor<?> constructor, java.util.List<Key<?>> paramList, Errors errors)
Matching logic for constructors annotated with AssistedInject.private static java.util.Map<java.lang.reflect.Method,AssistedConstructor<?>>
FactoryProvider. createMethodMapping(TypeLiteral<?> factoryType, TypeLiteral<?> implementationType)
Deprecated.private <T> InjectionPoint
FactoryProvider2. findMatchingConstructorInjectionPoint(java.lang.reflect.Method method, Key<?> returnType, TypeLiteral<T> implementation, java.util.List<Key<?>> paramList)
Finds a constructor suitable for the method.private java.util.Set<Dependency<?>>
FactoryProvider2. getDependencies(InjectionPoint ctorPoint, TypeLiteral<?> implementation)
Calculates all dependencies required by the implementation and constructor.<T> FactoryModuleBuilder
FactoryModuleBuilder. implement(Key<T> source, TypeLiteral<? extends T> target)
See the factory configuration examples atFactoryModuleBuilder
.<T> FactoryModuleBuilder
FactoryModuleBuilder. implement(TypeLiteral<T> source, TypeLiteral<? extends T> target)
See the factory configuration examples atFactoryModuleBuilder
.<T> FactoryModuleBuilder
FactoryModuleBuilder. implement(TypeLiteral<T> source, java.lang.annotation.Annotation annotation, TypeLiteral<? extends T> target)
See the factory configuration examples atFactoryModuleBuilder
.<T> FactoryModuleBuilder
FactoryModuleBuilder. implement(TypeLiteral<T> source, java.lang.annotation.Annotation annotation, java.lang.Class<? extends T> target)
See the factory configuration examples atFactoryModuleBuilder
.<T> FactoryModuleBuilder
FactoryModuleBuilder. implement(TypeLiteral<T> source, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, TypeLiteral<? extends T> target)
See the factory configuration examples atFactoryModuleBuilder
.<T> FactoryModuleBuilder
FactoryModuleBuilder. implement(TypeLiteral<T> source, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, java.lang.Class<? extends T> target)
See the factory configuration examples atFactoryModuleBuilder
.<T> FactoryModuleBuilder
FactoryModuleBuilder. implement(TypeLiteral<T> source, java.lang.Class<? extends T> target)
See the factory configuration examples atFactoryModuleBuilder
.<T> FactoryModuleBuilder
FactoryModuleBuilder. implement(java.lang.Class<T> source, TypeLiteral<? extends T> target)
See the factory configuration examples atFactoryModuleBuilder
.<T> FactoryModuleBuilder
FactoryModuleBuilder. implement(java.lang.Class<T> source, java.lang.annotation.Annotation annotation, TypeLiteral<? extends T> target)
See the factory configuration examples atFactoryModuleBuilder
.<T> FactoryModuleBuilder
FactoryModuleBuilder. implement(java.lang.Class<T> source, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, TypeLiteral<? extends T> target)
See the factory configuration examples atFactoryModuleBuilder
.private boolean
FactoryProvider2. isTypeNotSpecified(TypeLiteral<?> typeLiteral, ConfigurationException ce)
Returns true if the ConfigurationException is due to an error of TypeLiteral not being fully specified.private boolean
FactoryProvider2. isValidForOptimizedAssistedInject(java.util.Set<Dependency<?>> dependencies, java.lang.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 TypeLiteral Modifier and Type Method Description static <T> AssistedConstructor<T>
AssistedConstructor. create(java.lang.reflect.Constructor<T> constructor, java.util.List<TypeLiteral<?>> parameterTypes)
Constructors in com.google.inject.assistedinject with parameters of type TypeLiteral Constructor Description AssistData(java.lang.reflect.Constructor<?> constructor, Key<?> returnType, com.google.common.collect.ImmutableList<Key<?>> paramTypes, TypeLiteral<?> implementationType, java.lang.reflect.Method factoryMethod, java.util.Set<Dependency<?>> dependencies, boolean optimized, java.util.List<FactoryProvider2.ThreadLocalProvider> providers)
FactoryProvider(TypeLiteral<F> factoryType, TypeLiteral<?> implementationType, java.util.Map<java.lang.reflect.Method,AssistedConstructor<?>> factoryMethodToConstructor)
Deprecated.Constructor parameters in com.google.inject.assistedinject with type arguments of type TypeLiteral Constructor Description AssistedConstructor(java.lang.reflect.Constructor<T> constructor, java.util.List<TypeLiteral<?>> parameterTypes)
-
Uses of TypeLiteral in com.google.inject.binder
Methods in com.google.inject.binder with parameters of type TypeLiteral Modifier and Type Method Description ScopedBindingBuilder
LinkedBindingBuilder. to(TypeLiteral<? extends T> implementation)
See the EDSL examples atBinder
.<S extends T>
ScopedBindingBuilderLinkedBindingBuilder. toConstructor(java.lang.reflect.Constructor<S> constructor, TypeLiteral<? extends S> type)
See the EDSL examples atBinder
.ScopedBindingBuilder
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 TypeLiteral Modifier and Type Field Description private TypeLiteral<T>
RealMultibinder.BindingSelection. elementType
private TypeLiteral<K>
RealMapBinder.BindingSelection. keyType
static TypeLiteral<java.lang.String>
InjectorImpl. STRING_TYPE
(package private) TypeLiteral<T>
ProvidesMethodScanner.TypeAndValue. type
(package private) TypeLiteral<?>
Indexer.IndexedBinding. typeLiteral
private TypeLiteral<T>
MembersInjectorImpl. typeLiteral
private TypeLiteral<?>
ProviderMethodsModule. typeLiteral
private TypeLiteral<V>
RealMapBinder.BindingSelection. valueType
Fields in com.google.inject.internal with type parameters of type TypeLiteral Modifier and Type Field Description (package private) com.google.common.collect.ListMultimap<TypeLiteral<?>,Binding<?>>
InjectorImpl. bindingsMultimap
private FailableCache<TypeLiteral<?>,MembersInjectorImpl<?>>
MembersInjectorStore. cache
private static com.google.common.collect.ImmutableMap<TypeLiteral<?>,TypeLiteral<?>>
MoreTypes. PRIMITIVE_TO_WRAPPER
private static com.google.common.collect.ImmutableMap<TypeLiteral<?>,TypeLiteral<?>>
MoreTypes. PRIMITIVE_TO_WRAPPER
Methods in com.google.inject.internal that return TypeLiteral Modifier and Type Method Description 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<java.util.Collection<javax.inject.Provider<T>>>
RealMultibinder. collectionOfJavaxProvidersOf(TypeLiteral<T> elementType)
(package private) static <T> TypeLiteral<java.util.Collection<Provider<T>>>
RealMultibinder. collectionOfProvidersOf(TypeLiteral<T> elementType)
(package private) static <K,V>
TypeLiteral<java.util.Map.Entry<K,Provider<V>>>RealMapBinder. entryOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <K,V>
TypeLiteral<java.util.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()
TypeLiteral<K>
RealMapBinder.RealMapProvider. getKeyTypeLiteral()
private TypeLiteral<V>
RealMapBinder.BindingSelection. getValueType()
TypeLiteral<V>
RealMapBinder.RealMapProvider. getValueTypeLiteral()
(package private) static <T> TypeLiteral<?>
RealOptionalBinder. javaOptionalOf(TypeLiteral<T> type)
(package private) static <T> TypeLiteral<?>
RealOptionalBinder. javaOptionalOfJavaxProvider(TypeLiteral<T> type)
(package private) static <T> TypeLiteral<?>
RealOptionalBinder. javaOptionalOfProvider(TypeLiteral<T> type)
(package private) static <K,V>
TypeLiteral<java.util.Map<K,V>>RealMapBinder. mapOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <K,V>
TypeLiteral<java.util.Map<K,java.util.Collection<javax.inject.Provider<V>>>>RealMapBinder. mapOfCollectionOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <K,V>
TypeLiteral<java.util.Map<K,java.util.Collection<Provider<V>>>>RealMapBinder. mapOfCollectionOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <K,V>
TypeLiteral<java.util.Map<K,javax.inject.Provider<V>>>RealMapBinder. mapOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <K,V>
TypeLiteral<java.util.Map<K,Provider<V>>>RealMapBinder. mapOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <K,V>
TypeLiteral<java.util.Map<K,java.util.Set<javax.inject.Provider<V>>>>RealMapBinder. mapOfSetOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <K,V>
TypeLiteral<java.util.Map<K,java.util.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<java.util.Set<T>>
RealMultibinder. setOf(TypeLiteral<T> elementType)
(package private) static <K,V>
TypeLiteral<java.util.Set<java.util.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 TypeLiteral Modifier and Type Method Description private <T> BindingImpl<TypeLiteral<T>>
InjectorImpl. createTypeLiteralBinding(Key<TypeLiteral<T>> key, Errors errors)
Converts a binding for aKey<TypeLiteral<T>>
to the valueTypeLiteral<T>
.Methods in com.google.inject.internal with parameters of type TypeLiteral Modifier and Type Method Description Errors
Errors. ambiguousTypeConversion(java.lang.String stringValue, java.lang.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<java.util.Collection<javax.inject.Provider<T>>>
RealMultibinder. collectionOfJavaxProvidersOf(TypeLiteral<T> elementType)
(package private) static <T> TypeLiteral<java.util.Collection<Provider<T>>>
RealMultibinder. collectionOfProvidersOf(TypeLiteral<T> elementType)
Errors
Errors. constructorNotDefinedByType(java.lang.reflect.Constructor<?> constructor, TypeLiteral<?> type)
Errors
Errors. conversionError(java.lang.String stringValue, java.lang.Object source, TypeLiteral<?> type, TypeConverterBinding typeConverterBinding, java.lang.RuntimeException cause)
Errors
Errors. conversionTypeError(java.lang.String stringValue, java.lang.Object source, TypeLiteral<?> type, TypeConverterBinding typeConverterBinding, java.lang.Object converted)
Errors
Errors. converterReturnedNull(java.lang.String stringValue, java.lang.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<java.util.Map.Entry<K,Provider<V>>>RealMapBinder. entryOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <K,V>
TypeLiteral<java.util.Map.Entry<K,Provider<V>>>RealMapBinder. entryOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
static InternalProvisionException
InternalProvisionException. errorInUserInjector(MembersInjector<?> listener, TypeLiteral<?> type, java.lang.RuntimeException cause)
static InternalProvisionException
InternalProvisionException. errorNotifyingInjectionListener(InjectionListener<?> listener, TypeLiteral<?> type, java.lang.RuntimeException cause)
Errors
Errors. errorNotifyingTypeListener(TypeListenerBinding listener, TypeLiteral<?> type, java.lang.Throwable cause)
<T> java.util.List<Binding<T>>
InjectorImpl. findBindingsByType(TypeLiteral<T> type)
<T> java.util.List<Binding<T>>
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.TypeConverterBinding
InheritingState. getConverter(java.lang.String stringValue, TypeLiteral<?> type, Errors errors, java.lang.Object source)
TypeConverterBinding
State. getConverter(java.lang.String stringValue, TypeLiteral<?> type, Errors errors, java.lang.Object source)
Returns the matching converter fortype
, or null if none match.static Key<?>
Annotations. getKey(TypeLiteral<?> type, java.lang.reflect.Member member, java.lang.annotation.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, java.lang.reflect.Member member, java.lang.annotation.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<?>
RealOptionalBinder. javaOptionalOf(TypeLiteral<T> type)
(package private) static <T> TypeLiteral<?>
RealOptionalBinder. javaOptionalOfJavaxProvider(TypeLiteral<T> type)
(package private) static <T> TypeLiteral<?>
RealOptionalBinder. javaOptionalOfProvider(TypeLiteral<T> type)
Errors
Errors. keyNotFullySpecified(TypeLiteral<?> typeLiteral)
(package private) static <K,V>
TypeLiteral<java.util.Map<K,V>>RealMapBinder. mapOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <K,V>
TypeLiteral<java.util.Map<K,java.util.Collection<javax.inject.Provider<V>>>>RealMapBinder. mapOfCollectionOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <K,V>
TypeLiteral<java.util.Map<K,java.util.Collection<Provider<V>>>>RealMapBinder. mapOfCollectionOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <K,V>
TypeLiteral<java.util.Map<K,javax.inject.Provider<V>>>RealMapBinder. mapOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <K,V>
TypeLiteral<java.util.Map<K,Provider<V>>>RealMapBinder. mapOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <K,V>
TypeLiteral<java.util.Map<K,java.util.Set<javax.inject.Provider<V>>>>RealMapBinder. mapOfSetOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <K,V>
TypeLiteral<java.util.Map<K,java.util.Set<Provider<V>>>>RealMapBinder. mapOfSetOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
static <K,V>
RealMapBinder<K,V>RealMapBinder. newMapRealBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType)
Returns a new mapbinder that collects entries ofkeyType
/valueType
in aMap
that 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<java.util.Map<K,V>> mapKey, RealMultibinder<java.util.Map.Entry<K,Provider<V>>> entrySetBinder)
static <K,V>
RealMapBinder<K,V>RealMapBinder. newRealMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, java.lang.annotation.Annotation annotation)
Returns a new mapbinder that collects entries ofkeyType
/valueType
in aMap
that is itself bound withannotation
.static <K,V>
RealMapBinder<K,V>RealMapBinder. newRealMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Returns a new mapbinder that collects entries ofkeyType
/valueType
in aMap
that 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) boolean
MembersInjectorStore. remove(TypeLiteral<?> type)
Purges a type literal from the cache.(package private) static <T> TypeLiteral<java.util.Set<T>>
RealMultibinder. setOf(TypeLiteral<T> elementType)
(package private) static <K,V>
TypeLiteral<java.util.Set<java.util.Map.Entry<K,javax.inject.Provider<V>>>>RealMapBinder. setOfEntryOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
BindingBuilder<T>
BindingBuilder. to(TypeLiteral<? extends T> implementation)
<S extends T>
ScopedBindingBuilderBindingBuilder. toConstructor(java.lang.reflect.Constructor<S> constructor, TypeLiteral<? extends S> type)
BindingBuilder<T>
BindingBuilder. toProvider(TypeLiteral<? extends javax.inject.Provider<? extends T>> providerType)
Method parameters in com.google.inject.internal with type arguments of type TypeLiteral Modifier and Type Method Description private <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 void
TypeConverterBindingProcessor. internalConvertToTypes(InjectorImpl injector, Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter converter)
Constructors in com.google.inject.internal with parameters of type TypeLiteral Constructor Description BindingSelection(TypeLiteral<K> keyType, TypeLiteral<V> valueType, Key<java.util.Map<K,V>> mapKey, RealMultibinder<java.util.Map.Entry<K,Provider<V>>> entrySetBinder)
MembersInjectorImpl(InjectorImpl injector, TypeLiteral<T> typeLiteral, EncounterImpl<T> encounter, com.google.common.collect.ImmutableList<SingleMemberInjector> memberInjectors)
RealMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, Key<java.util.Map<K,V>> mapKey, RealMultibinder<java.util.Map.Entry<K,Provider<V>>> entrySetBinder)
Signature(TypeLiteral<?> typeLiteral, java.lang.reflect.Method method)
TypeAndValue(TypeLiteral<T> type, T value)
-
Uses of TypeLiteral in com.google.inject.multibindings
Methods in com.google.inject.multibindings that return TypeLiteral Modifier and Type Method Description TypeLiteral<?>
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 TypeLiteral Modifier and Type Method Description static <K,V>
MapBinder<K,V>MapBinder. newMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType)
Returns a new mapbinder that collects entries ofkeyType
/valueType
in aMap
that is itself bound with no binding annotation.static <K,V>
MapBinder<K,V>MapBinder. newMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, java.lang.annotation.Annotation annotation)
Returns a new mapbinder that collects entries ofkeyType
/valueType
in aMap
that is itself bound withannotation
.static <K,V>
MapBinder<K,V>MapBinder. newMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Returns a new mapbinder that collects entries ofkeyType
/valueType
in aMap
that 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 oftype
in aSet
that is itself bound with no binding annotation.static <T> Multibinder<T>
Multibinder. newSetBinder(Binder binder, TypeLiteral<T> type, java.lang.annotation.Annotation annotation)
Returns a new multibinder that collects instances oftype
in aSet
that is itself bound withannotation
.static <T> Multibinder<T>
Multibinder. newSetBinder(Binder binder, TypeLiteral<T> type, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Returns a new multibinder that collects instances oftype
in aSet
that is itself bound withannotationType
. -
Uses of TypeLiteral in com.google.inject.servlet
Fields in com.google.inject.servlet declared as TypeLiteral Modifier and Type Field Description private static TypeLiteral<FilterDefinition>
ManagedFilterPipeline. FILTER_DEFS
private static TypeLiteral<ServletDefinition>
ManagedServletPipeline. SERVLET_DEFS
-
Uses of TypeLiteral in com.google.inject.spi
Fields in com.google.inject.spi declared as TypeLiteral Modifier and Type Field Description private TypeLiteral<?>
InjectionPoint. declaringType
(package private) TypeLiteral<?>
InjectionPoint.InjectableMember. declaringType
private TypeLiteral<T>
InjectionRequest. type
private TypeLiteral<T>
MembersInjectorLookup. type
Fields in com.google.inject.spi with type parameters of type TypeLiteral Modifier and Type Field Description private Matcher<? super TypeLiteral<?>>
TypeConverterBinding. typeMatcher
private Matcher<? super TypeLiteral<?>>
TypeListenerBinding. typeMatcher
Methods in com.google.inject.spi that return TypeLiteral Modifier and Type Method Description TypeLiteral<?>
InjectionPoint. getDeclaringType()
Returns the generic type that defines this injection point.TypeLiteral<T>
InjectionRequest. getType()
TypeLiteral<T>
MembersInjectorLookup. getType()
Gets the type containing the members to be injected.Methods in com.google.inject.spi that return types with arguments of type TypeLiteral Modifier and Type Method Description Matcher<? 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 java.util.List<TypeLiteral<?>>
InjectionPoint. hierarchyFor(TypeLiteral<?> type)
Methods in com.google.inject.spi with parameters of type TypeLiteral Modifier and Type Method Description <T> AnnotatedBindingBuilder<T>
Elements.RecordingBinder. bind(TypeLiteral<T> typeLiteral)
java.lang.Object
TypeConverter. convert(java.lang.String value, TypeLiteral<?> toType)
Converts a string value.AnnotatedElementBuilder
Elements.RecordingBinder. expose(TypeLiteral<?> type)
static <T> InjectionPoint
InjectionPoint. forConstructor(java.lang.reflect.Constructor<T> constructor, TypeLiteral<? extends T> type)
Returns a new injection point for the specified constructor oftype
.static InjectionPoint
InjectionPoint. forConstructorOf(TypeLiteral<?> type)
Returns a new injection point for the injectable constructor oftype
.static java.util.Set<InjectionPoint>
InjectionPoint. forInstanceMethodsAndFields(TypeLiteral<?> type)
Returns all instance method and field injection points ontype
.private com.google.common.collect.ImmutableList<Dependency<?>>
InjectionPoint. forMember(java.lang.reflect.Member member, TypeLiteral<?> type, java.lang.annotation.Annotation[][] paramterAnnotations)
static <T> InjectionPoint
InjectionPoint. forMethod(java.lang.reflect.Method method, TypeLiteral<T> type)
Returns a new injection point for the specified method oftype
.static java.util.Set<InjectionPoint>
InjectionPoint. forStaticMethodsAndFields(TypeLiteral<?> type)
Returns all static method and field injection points ontype
.private static java.lang.reflect.Field[]
InjectionPoint. getDeclaredFields(TypeLiteral<?> type)
private static java.lang.reflect.Method[]
InjectionPoint. getDeclaredMethods(TypeLiteral<?> type)
private static java.util.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> void
TypeListener. hear(TypeLiteral<I> type, TypeEncounter<I> encounter)
Invoked when Guice encounters a new type eligible for constructor or members injection.private static java.util.List<TypeLiteral<?>>
InjectionPoint. hierarchyFor(TypeLiteral<?> type)
<T> void
Elements.RecordingBinder. requestInjection(TypeLiteral<T> type, T instance)
Method parameters in com.google.inject.spi with type arguments of type TypeLiteral Modifier and Type Method Description void
Elements.RecordingBinder. bindListener(Matcher<? super TypeLiteral<?>> typeMatcher, TypeListener listener)
void
Elements.RecordingBinder. convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter converter)
Constructors in com.google.inject.spi with parameters of type TypeLiteral Constructor Description InjectableField(TypeLiteral<?> declaringType, java.lang.reflect.Field field, java.lang.annotation.Annotation atInject)
InjectableMember(TypeLiteral<?> declaringType, java.lang.annotation.Annotation atInject)
InjectableMethod(TypeLiteral<?> declaringType, java.lang.reflect.Method method, java.lang.annotation.Annotation atInject)
InjectionPoint(TypeLiteral<?> declaringType, java.lang.reflect.Constructor<?> constructor)
InjectionPoint(TypeLiteral<?> declaringType, java.lang.reflect.Field field, boolean optional)
InjectionPoint(TypeLiteral<?> declaringType, java.lang.reflect.Method method, boolean optional)
InjectionRequest(java.lang.Object source, TypeLiteral<T> type, T instance)
MembersInjectorLookup(java.lang.Object source, TypeLiteral<T> type)
Constructor parameters in com.google.inject.spi with type arguments of type TypeLiteral Constructor Description TypeConverterBinding(java.lang.Object source, Matcher<? super TypeLiteral<?>> typeMatcher, TypeConverter typeConverter)
TypeListenerBinding(java.lang.Object source, TypeListener listener, Matcher<? super TypeLiteral<?>> typeMatcher)
-
Uses of TypeLiteral in com.google.inject.throwingproviders
Fields in com.google.inject.throwingproviders declared as TypeLiteral Modifier and Type Field Description private static TypeLiteral<CheckedProviderMethod<?>>
ThrowingProviderBinder. CHECKED_PROVIDER_METHOD_TYPE
private static TypeLiteral<CheckedProvider<?>>
ThrowingProviderBinder. CHECKED_PROVIDER_TYPE
private TypeLiteral<?>
CheckedProviderMethodsModule. typeLiteral
Fields in com.google.inject.throwingproviders with type parameters of type TypeLiteral Modifier and Type Field Description private java.util.List<TypeLiteral<?>>
CheckedProviderMethod. exceptionTypes
Methods in com.google.inject.throwingproviders with parameters of type TypeLiteral Modifier and Type Method Description <P extends CheckedProvider,T>
ThrowingProviderBinder.SecondaryBinder<P,T>ThrowingProviderBinder. bind(java.lang.Class<P> interfaceType, TypeLiteral<T> typeLiteral)
(package private) static <T> java.lang.reflect.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, java.lang.reflect.InvocationHandler handler)
(package private) <T> Key<T>
CheckedProviderMethodsModule. getKey(Errors errors, TypeLiteral<T> type, java.lang.reflect.Member member, java.lang.annotation.Annotation[] annotations)
static <T,P extends CheckedProvider<? super T>>
PCheckedProviders. of(TypeLiteral<P> providerType, T instance)
Returns aCheckedProvider
which always providesinstance
.ScopedBindingBuilder
ThrowingProviderBinder.SecondaryBinder. providing(TypeLiteral<? extends T> cxtorLiteral)
static <T,P extends CheckedProvider<? super T>>
PCheckedProviders. throwing(TypeLiteral<P> providerType, java.lang.Class<? extends java.lang.Throwable> throwable)
Returns aCheckedProvider
which always throws exceptions.Method parameters in com.google.inject.throwingproviders with type arguments of type TypeLiteral Modifier and Type Method Description (package private) static void
CheckedProvideUtils. validateExceptions(Binder binder, java.lang.Iterable<TypeLiteral<?>> actualExceptionTypes, java.lang.Iterable<java.lang.Class<? extends java.lang.Throwable>> expectedExceptionTypes, java.lang.Class<? extends CheckedProvider> checkedProvider)
Adds errors to the binder if the exceptions aren't valid.
-