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 requires
guice-assistedinject.jar . |
com.google.inject.binder |
Interfaces which make up
Binder 's
expression language. |
com.google.inject.internal |
Guice (sounds like like "juice")
|
com.google.inject.multibindings |
Extension for binding multiple instances in a collection; this extension requires
guice-multibindings.jar . |
com.google.inject.servlet |
Servlet API scopes, bindings and registration; this extension requires
guice-servlet.jar . |
com.google.inject.spi |
Guice service provider interface
|
com.google.inject.testing.fieldbinder | |
com.google.inject.throwingproviders |
Extension for injecting objects that may throw at provision time; this extension requires
guice-throwingproviders.jar . |
Modifier and Type | Field and Description |
---|---|
private TypeLiteral<T> |
Key.typeLiteral |
Modifier and Type | Method and 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 given
Class instance. |
static TypeLiteral<?> |
TypeLiteral.get(java.lang.reflect.Type type)
Gets type literal for the given
Type instance. |
TypeLiteral<?> |
TypeLiteral.getFieldType(java.lang.reflect.Field field)
Returns the resolved generic type of
field . |
TypeLiteral<?> |
TypeLiteral.getReturnType(java.lang.reflect.Method method)
Returns the resolved generic return type of
method . |
TypeLiteral<?> |
TypeLiteral.getSupertype(java.lang.Class<?> supertype)
Returns the generic form of
supertype . |
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 in
toResolve and returns the result. |
Modifier and Type | Method and Description |
---|---|
java.util.List<TypeLiteral<?>> |
TypeLiteral.getExceptionTypes(java.lang.reflect.Member methodOrConstructor)
Returns the resolved generic exception types thrown by
constructor . |
java.util.List<TypeLiteral<?>> |
TypeLiteral.getParameterTypes(java.lang.reflect.Member methodOrConstructor)
Returns the resolved generic parameter types of
methodOrConstructor . |
private java.util.List<TypeLiteral<?>> |
TypeLiteral.resolveAll(java.lang.reflect.Type[] types)
Returns an immutable list of the resolved types.
|
Modifier and Type | Method and Description |
---|---|
protected <T> AnnotatedBindingBuilder<T> |
PrivateModule.bind(TypeLiteral<T> typeLiteral) |
<T> AnnotatedBindingBuilder<T> |
Binder.bind(TypeLiteral<T> typeLiteral)
See the EDSL examples at
Binder . |
protected <T> AnnotatedBindingBuilder<T> |
AbstractModule.bind(TypeLiteral<T> typeLiteral) |
AnnotatedElementBuilder |
PrivateBinder.expose(TypeLiteral<?> type)
Makes a binding for
type available to the enclosing environment. |
protected AnnotatedElementBuilder |
PrivateModule.expose(TypeLiteral<?> type)
Makes a binding for
type available to other modules and the injector. |
<T> java.util.List<Binding<T>> |
Injector.findBindingsByType(TypeLiteral<T> type)
Returns all explicit bindings for
type . |
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.
|
<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 type
T . |
protected <T> MembersInjector<T> |
PrivateModule.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 type
T . |
protected <T> MembersInjector<T> |
AbstractModule.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, the
Injector will inject instance fields
and methods of the given object. |
Modifier and Type | Method and Description |
---|---|
protected void |
PrivateModule.bindListener(Matcher<? super TypeLiteral<?>> typeMatcher,
TypeListener listener) |
void |
Binder.bindListener(Matcher<? super TypeLiteral<?>> typeMatcher,
TypeListener listener)
Registers a listener for injectable types.
|
protected void |
AbstractModule.bindListener(Matcher<? super TypeLiteral<?>> typeMatcher,
TypeListener listener) |
protected void |
PrivateModule.convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher,
TypeConverter converter) |
void |
Binder.convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher,
TypeConverter converter)
Binds a type converter.
|
protected void |
AbstractModule.convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher,
TypeConverter converter) |
Constructor and Description |
---|
Key(TypeLiteral<T> typeLiteral,
Key.AnnotationStrategy annotationStrategy)
Constructs a key from a manually specified type.
|
Modifier and Type | Field and Description |
---|---|
private TypeLiteral<F> |
FactoryProvider.factoryType
Deprecated.
|
private TypeLiteral<?> |
FactoryProvider.implementationType
Deprecated.
|
(package private) TypeLiteral<?> |
FactoryProvider2.AssistData.implementationType
the type of the implementation constructed
|
Modifier and Type | Field and Description |
---|---|
private java.util.Map<Key<?>,TypeLiteral<?>> |
BindingCollector.bindings |
Modifier and Type | Method and Description |
---|---|
TypeLiteral<?> |
AssistedMethod.getImplementationType()
Returns the implementation type that will be created when the method is
used.
|
TypeLiteral<?> |
FactoryProvider2.AssistData.getImplementationType() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<Key<?>,TypeLiteral<?>> |
BindingCollector.getBindings() |
Modifier and Type | Method and Description |
---|---|
BindingCollector |
BindingCollector.addBinding(Key<?> key,
TypeLiteral<?> target) |
<F> Module |
FactoryModuleBuilder.build(TypeLiteral<F> factoryInterface)
See the factory configuration examples at
FactoryModuleBuilder . |
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 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(java.lang.Class<T> source,
java.lang.annotation.Annotation annotation,
TypeLiteral<? extends T> target)
See the factory configuration examples at
FactoryModuleBuilder . |
<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 at
FactoryModuleBuilder . |
<T> FactoryModuleBuilder |
FactoryModuleBuilder.implement(java.lang.Class<T> source,
TypeLiteral<? extends T> target)
See the factory configuration examples at
FactoryModuleBuilder . |
<T> FactoryModuleBuilder |
FactoryModuleBuilder.implement(Key<T> source,
TypeLiteral<? extends T> target)
See the factory configuration examples at
FactoryModuleBuilder . |
<T> FactoryModuleBuilder |
FactoryModuleBuilder.implement(TypeLiteral<T> source,
java.lang.annotation.Annotation annotation,
java.lang.Class<? extends T> target)
See the factory configuration examples at
FactoryModuleBuilder . |
<T> FactoryModuleBuilder |
FactoryModuleBuilder.implement(TypeLiteral<T> source,
java.lang.annotation.Annotation annotation,
TypeLiteral<? extends T> target)
See the factory configuration examples at
FactoryModuleBuilder . |
<T> FactoryModuleBuilder |
FactoryModuleBuilder.implement(TypeLiteral<T> source,
java.lang.annotation.Annotation annotation,
TypeLiteral<? extends T> target)
See the factory configuration examples at
FactoryModuleBuilder . |
<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 at
FactoryModuleBuilder . |
<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 at
FactoryModuleBuilder . |
<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 at
FactoryModuleBuilder . |
<T> FactoryModuleBuilder |
FactoryModuleBuilder.implement(TypeLiteral<T> source,
java.lang.Class<? extends T> target)
See the factory configuration examples at
FactoryModuleBuilder . |
<T> FactoryModuleBuilder |
FactoryModuleBuilder.implement(TypeLiteral<T> source,
TypeLiteral<? extends T> target)
See the factory configuration examples at
FactoryModuleBuilder . |
<T> FactoryModuleBuilder |
FactoryModuleBuilder.implement(TypeLiteral<T> source,
TypeLiteral<? extends T> target)
See the factory configuration examples at
FactoryModuleBuilder . |
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.
|
static <F> Provider<F> |
FactoryProvider.newFactory(TypeLiteral<F> factoryType,
TypeLiteral<?> implementationType)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static <T> AssistedConstructor<T> |
AssistedConstructor.create(java.lang.reflect.Constructor<T> constructor,
java.util.List<TypeLiteral<?>> parameterTypes) |
Constructor and 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.
|
FactoryProvider(TypeLiteral<F> factoryType,
TypeLiteral<?> implementationType,
java.util.Map<java.lang.reflect.Method,AssistedConstructor<?>> factoryMethodToConstructor)
Deprecated.
|
Constructor and Description |
---|
AssistedConstructor(java.lang.reflect.Constructor<T> constructor,
java.util.List<TypeLiteral<?>> parameterTypes) |
Modifier and Type | Method and Description |
---|---|
ScopedBindingBuilder |
LinkedBindingBuilder.to(TypeLiteral<? extends T> implementation)
See the EDSL examples at
Binder . |
<S extends T> |
LinkedBindingBuilder.toConstructor(java.lang.reflect.Constructor<S> constructor,
TypeLiteral<? extends S> type)
See the EDSL examples at
Binder . |
ScopedBindingBuilder |
LinkedBindingBuilder.toProvider(TypeLiteral<? extends javax.inject.Provider<? extends T>> providerType)
See the EDSL examples at
Binder . |
Modifier and Type | Field and Description |
---|---|
static TypeLiteral<java.lang.String> |
InjectorImpl.STRING_TYPE |
private TypeLiteral<?> |
ProviderMethodsModule.typeLiteral |
private TypeLiteral<T> |
MembersInjectorImpl.typeLiteral |
Modifier and Type | Field and Description |
---|---|
private FailableCache<TypeLiteral<?>,MembersInjectorImpl<?>> |
MembersInjectorStore.cache |
(package private) java.util.Map<TypeLiteral<?>,java.util.List<Binding<?>>> |
InjectorImpl.BindingsMultimap.multimap |
private static java.util.Map<TypeLiteral<?>,TypeLiteral<?>> |
MoreTypes.PRIMITIVE_TO_WRAPPER |
private static java.util.Map<TypeLiteral<?>,TypeLiteral<?>> |
MoreTypes.PRIMITIVE_TO_WRAPPER |
Modifier and Type | Method and Description |
---|---|
static <T> TypeLiteral<T> |
MoreTypes.canonicalizeForKey(TypeLiteral<T> typeLiteral)
Returns an type that's appropriate for use in a key.
|
Modifier and Type | Method and Description |
---|---|
private <T> BindingImpl<TypeLiteral<T>> |
InjectorImpl.createTypeLiteralBinding(Key<TypeLiteral<T>> key,
Errors errors)
Converts a binding for a
Key<TypeLiteral<T>> to the value TypeLiteral<T> . |
Modifier and Type | Method and 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.
|
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.
|
Errors |
Errors.errorInUserInjector(MembersInjector<?> listener,
TypeLiteral<?> type,
java.lang.RuntimeException cause) |
Errors |
Errors.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.
|
(package private) <T> java.util.List<Binding<T>> |
InjectorImpl.BindingsMultimap.getAll(TypeLiteral<T> type) |
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 for
type , or null if none match. |
(package private) <T> Key<T> |
ProviderMethodsModule.getKey(Errors errors,
TypeLiteral<T> type,
java.lang.reflect.Member member,
java.lang.annotation.Annotation[] annotations) |
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.
|
<T> MembersInjector<T> |
InjectorImpl.getMembersInjector(TypeLiteral<T> typeLiteral) |
<T> MembersInjector<T> |
Lookups.getMembersInjector(TypeLiteral<T> type) |
<T> MembersInjector<T> |
InternalInjectorCreator.ToolStageInjector.getMembersInjector(TypeLiteral<T> typeLiteral) |
<T> MembersInjector<T> |
DeferredLookups.getMembersInjector(TypeLiteral<T> type) |
<T> MembersInjector<T> |
EncounterImpl.getMembersInjector(TypeLiteral<T> typeLiteral) |
Errors |
Errors.keyNotFullySpecified(TypeLiteral<?> typeLiteral) |
(package private) <T> void |
InjectorImpl.BindingsMultimap.put(TypeLiteral<T> type,
Binding<T> binding) |
(package private) boolean |
MembersInjectorStore.remove(TypeLiteral<?> type)
Purges a type literal from the cache.
|
BindingBuilder<T> |
BindingBuilder.to(TypeLiteral<? extends T> implementation) |
<S extends T> |
BindingBuilder.toConstructor(java.lang.reflect.Constructor<S> constructor,
TypeLiteral<? extends S> type) |
BindingBuilder<T> |
BindingBuilder.toProvider(TypeLiteral<? extends javax.inject.Provider<? extends T>> providerType) |
Modifier and Type | Method and Description |
---|---|
private <T> BindingImpl<TypeLiteral<T>> |
InjectorImpl.createTypeLiteralBinding(Key<TypeLiteral<T>> key,
Errors errors)
Converts a binding for a
Key<TypeLiteral<T>> to the value TypeLiteral<T> . |
private static void |
TypeConverterBindingProcessor.internalConvertToTypes(InjectorImpl injector,
Matcher<? super TypeLiteral<?>> typeMatcher,
TypeConverter converter) |
Constructor and Description |
---|
MembersInjectorImpl(InjectorImpl injector,
TypeLiteral<T> typeLiteral,
EncounterImpl<T> encounter,
com.google.common.collect.ImmutableList<SingleMemberInjector> memberInjectors) |
Modifier and Type | Field and Description |
---|---|
private TypeLiteral<T> |
Multibinder.RealMultibinder.elementType |
private TypeLiteral<K> |
MapBinder.RealMapBinder.keyType |
(package private) TypeLiteral<T> |
MultibindingsScanner.TypeAndValue.type |
(package private) TypeLiteral<?> |
Indexer.IndexedBinding.typeLiteral |
private TypeLiteral<V> |
MapBinder.RealMapBinder.valueType |
Modifier and Type | Method and Description |
---|---|
(package private) static <T> TypeLiteral<java.util.Collection<javax.inject.Provider<T>>> |
Multibinder.collectionOfJavaxProvidersOf(TypeLiteral<T> elementType) |
(package private) static <T> TypeLiteral<java.util.Collection<Provider<T>>> |
Multibinder.collectionOfProvidersOf(TypeLiteral<T> elementType) |
(package private) static <K,V> TypeLiteral<java.util.Map.Entry<K,Provider<V>>> |
MapBinder.entryOfJavaxProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map.Entry<K,Provider<V>>> |
MapBinder.entryOfProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
TypeLiteral<?> |
MultibinderBinding.getElementTypeLiteral()
Returns the TypeLiteral that describes the type of elements in the set.
|
TypeLiteral<?> |
Multibinder.RealMultibinder.getElementTypeLiteral() |
TypeLiteral<?> |
MapBinderBinding.getKeyTypeLiteral()
Returns the TypeLiteral describing the keys of the map.
|
TypeLiteral<?> |
MapBinder.RealMapBinder.RealMapProvider.getKeyTypeLiteral() |
TypeLiteral<?> |
MapBinderBinding.getValueTypeLiteral()
Returns the TypeLiteral describing the values of the map.
|
TypeLiteral<?> |
MapBinder.RealMapBinder.RealMapProvider.getValueTypeLiteral() |
(package private) static <T> TypeLiteral<?> |
OptionalBinder.javaOptionalOf(TypeLiteral<T> type) |
(package private) static <T> TypeLiteral<?> |
OptionalBinder.javaOptionalOfJavaxProvider(TypeLiteral<T> type) |
(package private) static <T> TypeLiteral<?> |
OptionalBinder.javaOptionalOfProvider(TypeLiteral<T> type) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,V>> |
MapBinder.mapOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,java.util.Collection<javax.inject.Provider<V>>>> |
MapBinder.mapOfCollectionOfJavaxProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,java.util.Collection<Provider<V>>>> |
MapBinder.mapOfCollectionOfProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,javax.inject.Provider<V>>> |
MapBinder.mapOfJavaxProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,Provider<V>>> |
MapBinder.mapOfProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,java.util.Set<javax.inject.Provider<V>>>> |
MapBinder.mapOfSetOfJavaxProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,java.util.Set<Provider<V>>>> |
MapBinder.mapOfSetOfProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <T> TypeLiteral<com.google.common.base.Optional<T>> |
OptionalBinder.optionalOf(TypeLiteral<T> type) |
(package private) static <T> TypeLiteral<com.google.common.base.Optional<javax.inject.Provider<T>>> |
OptionalBinder.optionalOfJavaxProvider(TypeLiteral<T> type) |
(package private) static <T> TypeLiteral<com.google.common.base.Optional<Provider<T>>> |
OptionalBinder.optionalOfProvider(TypeLiteral<T> type) |
(package private) static <T> TypeLiteral<java.util.Set<T>> |
Multibinder.setOf(TypeLiteral<T> elementType) |
(package private) static <K,V> TypeLiteral<java.util.Set<java.util.Map.Entry<K,javax.inject.Provider<V>>>> |
MapBinder.setOfEntryOfJavaxProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
Modifier and Type | Method and Description |
---|---|
(package private) static <T> TypeLiteral<java.util.Collection<javax.inject.Provider<T>>> |
Multibinder.collectionOfJavaxProvidersOf(TypeLiteral<T> elementType) |
(package private) static <T> TypeLiteral<java.util.Collection<Provider<T>>> |
Multibinder.collectionOfProvidersOf(TypeLiteral<T> elementType) |
(package private) static <K,V> TypeLiteral<java.util.Map.Entry<K,Provider<V>>> |
MapBinder.entryOfJavaxProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map.Entry<K,Provider<V>>> |
MapBinder.entryOfJavaxProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map.Entry<K,Provider<V>>> |
MapBinder.entryOfProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map.Entry<K,Provider<V>>> |
MapBinder.entryOfProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <T> TypeLiteral<?> |
OptionalBinder.javaOptionalOf(TypeLiteral<T> type) |
(package private) static <T> TypeLiteral<?> |
OptionalBinder.javaOptionalOfJavaxProvider(TypeLiteral<T> type) |
(package private) static <T> TypeLiteral<?> |
OptionalBinder.javaOptionalOfProvider(TypeLiteral<T> type) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,V>> |
MapBinder.mapOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,V>> |
MapBinder.mapOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,java.util.Collection<javax.inject.Provider<V>>>> |
MapBinder.mapOfCollectionOfJavaxProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,java.util.Collection<javax.inject.Provider<V>>>> |
MapBinder.mapOfCollectionOfJavaxProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,java.util.Collection<Provider<V>>>> |
MapBinder.mapOfCollectionOfProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,java.util.Collection<Provider<V>>>> |
MapBinder.mapOfCollectionOfProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,javax.inject.Provider<V>>> |
MapBinder.mapOfJavaxProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,javax.inject.Provider<V>>> |
MapBinder.mapOfJavaxProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,Provider<V>>> |
MapBinder.mapOfProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,Provider<V>>> |
MapBinder.mapOfProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,java.util.Set<javax.inject.Provider<V>>>> |
MapBinder.mapOfSetOfJavaxProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,java.util.Set<javax.inject.Provider<V>>>> |
MapBinder.mapOfSetOfJavaxProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,java.util.Set<Provider<V>>>> |
MapBinder.mapOfSetOfProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Map<K,java.util.Set<Provider<V>>>> |
MapBinder.mapOfSetOfProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
static <K,V> MapBinder<K,V> |
MapBinder.newMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType)
Returns a new mapbinder that collects entries of
keyType /valueType in a
Map that is itself bound with no binding annotation. |
static <K,V> MapBinder<K,V> |
MapBinder.newMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType)
Returns a new mapbinder that collects entries of
keyType /valueType in a
Map 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 of
keyType /valueType in a
Map that is itself bound with 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 of
keyType /valueType in a
Map that is itself bound with annotation . |
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 of
keyType /valueType in a
Map that is itself bound with annotationType . |
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 of
keyType /valueType in a
Map that is itself bound with annotationType . |
static <T> OptionalBinder<T> |
OptionalBinder.newOptionalBinder(Binder binder,
TypeLiteral<T> type) |
(package private) static <K,V> MapBinder.RealMapBinder<K,V> |
MapBinder.newRealMapBinder(Binder binder,
TypeLiteral<K> keyType,
Key<V> valueTypeAndAnnotation) |
private static <K,V> MapBinder.RealMapBinder<K,V> |
MapBinder.newRealMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType,
Key<java.util.Map<K,V>> mapKey,
Multibinder<java.util.Map.Entry<K,Provider<V>>> entrySetBinder) |
private static <K,V> MapBinder.RealMapBinder<K,V> |
MapBinder.newRealMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType,
Key<java.util.Map<K,V>> mapKey,
Multibinder<java.util.Map.Entry<K,Provider<V>>> entrySetBinder) |
static <T> Multibinder<T> |
Multibinder.newSetBinder(Binder binder,
TypeLiteral<T> type)
Returns a new multibinder that collects instances of
type in a Set 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 of
type in a Set that is
itself bound with annotation . |
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 of
type in a Set that is
itself bound with annotationType . |
(package private) static <T> TypeLiteral<com.google.common.base.Optional<T>> |
OptionalBinder.optionalOf(TypeLiteral<T> type) |
(package private) static <T> TypeLiteral<com.google.common.base.Optional<javax.inject.Provider<T>>> |
OptionalBinder.optionalOfJavaxProvider(TypeLiteral<T> type) |
(package private) static <T> TypeLiteral<com.google.common.base.Optional<Provider<T>>> |
OptionalBinder.optionalOfProvider(TypeLiteral<T> type) |
(package private) static <T> TypeLiteral<java.util.Set<T>> |
Multibinder.setOf(TypeLiteral<T> elementType) |
(package private) static <K,V> TypeLiteral<java.util.Set<java.util.Map.Entry<K,javax.inject.Provider<V>>>> |
MapBinder.setOfEntryOfJavaxProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
(package private) static <K,V> TypeLiteral<java.util.Set<java.util.Map.Entry<K,javax.inject.Provider<V>>>> |
MapBinder.setOfEntryOfJavaxProviderOf(TypeLiteral<K> keyType,
TypeLiteral<V> valueType) |
Constructor and Description |
---|
RealMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType,
Key<java.util.Map<K,V>> mapKey,
Multibinder<java.util.Map.Entry<K,Provider<V>>> entrySetBinder) |
RealMapBinder(Binder binder,
TypeLiteral<K> keyType,
TypeLiteral<V> valueType,
Key<java.util.Map<K,V>> mapKey,
Multibinder<java.util.Map.Entry<K,Provider<V>>> entrySetBinder) |
RealMultibinder(Binder binder,
TypeLiteral<T> elementType,
Key<java.util.Set<T>> setKey) |
TypeAndValue(TypeLiteral<T> type,
T value) |
Modifier and Type | Field and Description |
---|---|
private static TypeLiteral<FilterDefinition> |
ManagedFilterPipeline.FILTER_DEFS |
private static TypeLiteral<ServletDefinition> |
ManagedServletPipeline.SERVLET_DEFS |
Modifier and Type | Field and Description |
---|---|
private TypeLiteral<?> |
InjectionPoint.declaringType |
(package private) TypeLiteral<?> |
InjectionPoint.InjectableMember.declaringType |
private TypeLiteral<T> |
InjectionRequest.type |
private TypeLiteral<T> |
MembersInjectorLookup.type |
Modifier and Type | Field and Description |
---|---|
private Matcher<? super TypeLiteral<?>> |
TypeListenerBinding.typeMatcher |
private Matcher<? super TypeLiteral<?>> |
TypeConverterBinding.typeMatcher |
Modifier and Type | Method and 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.
|
Modifier and Type | Method and Description |
---|---|
Matcher<? super TypeLiteral<?>> |
TypeListenerBinding.getTypeMatcher()
Returns the type matcher which chooses which types the listener should be notified of.
|
Matcher<? super TypeLiteral<?>> |
TypeConverterBinding.getTypeMatcher() |
private static java.util.List<TypeLiteral<?>> |
InjectionPoint.hierarchyFor(TypeLiteral<?> type) |
Modifier and Type | Method and 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 of
type . |
static InjectionPoint |
InjectionPoint.forConstructorOf(TypeLiteral<?> type)
Returns a new injection point for the injectable constructor of
type . |
static java.util.Set<InjectionPoint> |
InjectionPoint.forInstanceMethodsAndFields(TypeLiteral<?> type)
Returns all instance method and field injection points on
type . |
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 of
type . |
static java.util.Set<InjectionPoint> |
InjectionPoint.forStaticMethodsAndFields(TypeLiteral<?> type)
Returns all static method and field injection points on
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> |
TypeEncounter.getMembersInjector(TypeLiteral<T> typeLiteral)
Returns the members injector used to inject dependencies into methods and fields on instances
of the given type
T . |
<T> MembersInjector<T> |
Elements.RecordingBinder.getMembersInjector(TypeLiteral<T> typeLiteral) |
<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) |
Modifier and Type | Method and Description |
---|---|
void |
Elements.RecordingBinder.bindListener(Matcher<? super TypeLiteral<?>> typeMatcher,
TypeListener listener) |
void |
Elements.RecordingBinder.convertToTypes(Matcher<? super TypeLiteral<?>> typeMatcher,
TypeConverter converter) |
Constructor and 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 and Description |
---|
TypeConverterBinding(java.lang.Object source,
Matcher<? super TypeLiteral<?>> typeMatcher,
TypeConverter typeConverter) |
TypeListenerBinding(java.lang.Object source,
TypeListener listener,
Matcher<? super TypeLiteral<?>> typeMatcher) |
Modifier and Type | Field and Description |
---|---|
(package private) TypeLiteral<?> |
BoundFieldModule.BoundFieldInfo.boundType
The type this field will bind to.
|
(package private) TypeLiteral<?> |
BoundFieldModule.BoundFieldInfo.type
The actual type of the field.
|
Modifier and Type | Field and Description |
---|---|
(package private) com.google.common.base.Optional<TypeLiteral<?>> |
BoundFieldModule.BoundFieldInfo.naturalType
The "natural" type of this field.
|
Modifier and Type | Method and Description |
---|---|
private TypeLiteral<?> |
BoundFieldModule.BoundFieldInfo.getBoundType() |
Modifier and Type | Method and Description |
---|---|
private com.google.common.base.Optional<TypeLiteral<?>> |
BoundFieldModule.BoundFieldInfo.getNaturalFieldType()
Retrieves the type this field binds to naturally.
|
Modifier and Type | Method and Description |
---|---|
private com.google.common.base.Optional<BoundFieldModule.BoundFieldInfo> |
BoundFieldModule.getBoundFieldInfo(TypeLiteral<?> containingClassType,
java.lang.reflect.Field field)
Retrieve a
BoundFieldModule.BoundFieldInfo . |
Constructor and Description |
---|
BoundFieldInfo(java.lang.reflect.Field field,
Bind bindAnnotation,
TypeLiteral<?> fieldType) |
Modifier and Type | Field and Description |
---|---|
private static TypeLiteral<CheckedProviderMethod<?>> |
ThrowingProviderBinder.CHECKED_PROVIDER_METHOD_TYPE |
private static TypeLiteral<CheckedProvider<?>> |
ThrowingProviderBinder.CHECKED_PROVIDER_TYPE |
private TypeLiteral<?> |
CheckedProviderMethodsModule.typeLiteral |
Modifier and Type | Field and Description |
---|---|
private java.util.List<TypeLiteral<?>> |
CheckedProviderMethod.exceptionTypes |
Modifier and Type | Method and Description |
---|---|
<P extends CheckedProvider,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) |
(package private) <T> Key<T> |
CheckedProviderMethodsModule.getKey(Errors errors,
TypeLiteral<T> type,
java.lang.reflect.Member member,
java.lang.annotation.Annotation[] annotations) |
ScopedBindingBuilder |
ThrowingProviderBinder.SecondaryBinder.providing(TypeLiteral<? extends T> cxtorLiteral) |
Modifier and Type | Method and 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.
|
Constructor and Description |
---|
CheckedProviderMethod(Key<T> key,
java.lang.reflect.Method method,
java.lang.Object instance,
com.google.common.collect.ImmutableSet<Dependency<?>> dependencies,
java.util.List<Provider<?>> parameterProviders,
java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation,
java.lang.Class<? extends CheckedProvider> checkedProvider,
java.util.List<TypeLiteral<?>> exceptionTypes,
boolean scopeExceptions) |