Package | Description |
---|---|
com.google.inject.assistedinject |
Extension for combining factory interfaces with injection; this extension requires
guice-assistedinject.jar . |
com.google.inject.grapher | |
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.spi |
Guice service provider interface
|
Modifier and Type | Method and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
private java.util.Set<Dependency<?>> |
FactoryProvider2.getDependencies(InjectionPoint ctorPoint,
TypeLiteral<?> implementation)
Calculates all dependencies required by the implementation and constructor.
|
Modifier and Type | Field and Description |
---|---|
private InjectionPoint |
DependencyEdge.injectionPoint
Injection point to which this dependency belongs, or null if the dependency isn't attached to a
particular injection point.
|
Modifier and Type | Method and Description |
---|---|
InjectionPoint |
DependencyEdge.getInjectionPoint() |
Constructor and Description |
---|
DependencyEdge(NodeId fromId,
NodeId toId,
InjectionPoint injectionPoint) |
Modifier and Type | Field and Description |
---|---|
private InjectionPoint |
ConstructorBindingImpl.constructorInjectionPoint |
private InjectionPoint |
DefaultConstructionProxyFactory.injectionPoint |
(package private) InjectionPoint |
DefaultConstructionProxyFactory.FastClassProxy.injectionPoint |
(package private) InjectionPoint |
DefaultConstructionProxyFactory.ReflectiveProxy.injectionPoint |
private InjectionPoint |
ProxyFactory.injectionPoint |
(package private) InjectionPoint |
ProxyFactory.ProxyConstructor.injectionPoint |
(package private) InjectionPoint |
SingleFieldInjector.injectionPoint |
private InjectionPoint |
SingleMethodInjector.injectionPoint |
Modifier and Type | Field and Description |
---|---|
private FailableCache<InjectionPoint,ConstructorInjector<?>> |
ConstructorInjectorStore.cache |
private com.google.common.collect.ImmutableSet<InjectionPoint> |
ConstructorInjector.injectableMembers |
(package private) com.google.common.collect.ImmutableSet<InjectionPoint> |
InstanceBindingImpl.injectionPoints |
(package private) com.google.common.collect.ImmutableSet<InjectionPoint> |
ProviderInstanceBindingImpl.injectionPoints |
Modifier and Type | Method and Description |
---|---|
InjectionPoint |
ConstructorBindingImpl.getConstructor() |
InjectionPoint |
ConstructionProxy.getInjectionPoint()
Returns the injection point for this constructor.
|
InjectionPoint |
DefaultConstructionProxyFactory.FastClassProxy.getInjectionPoint() |
InjectionPoint |
DefaultConstructionProxyFactory.ReflectiveProxy.getInjectionPoint() |
InjectionPoint |
ProxyFactory.ProxyConstructor.getInjectionPoint() |
InjectionPoint |
SingleFieldInjector.getInjectionPoint() |
InjectionPoint |
SingleMemberInjector.getInjectionPoint() |
InjectionPoint |
SingleMethodInjector.getInjectionPoint() |
(package private) InjectionPoint |
ConstructorBindingImpl.getInternalConstructor()
Returns an injection point that can be used to clean up the constructor store.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<InjectionPoint> |
ConstructorBindingImpl.getInjectableMembers() |
com.google.common.collect.ImmutableSet<InjectionPoint> |
ConstructorInjector.getInjectableMembers() |
java.util.Set<InjectionPoint> |
InstanceBindingImpl.getInjectionPoints() |
com.google.common.collect.ImmutableSet<InjectionPoint> |
MembersInjectorImpl.getInjectionPoints() |
java.util.Set<InjectionPoint> |
ProviderInstanceBindingImpl.getInjectionPoints() |
Modifier and Type | Method and Description |
---|---|
(package private) static <T> ConstructorBindingImpl<T> |
ConstructorBindingImpl.create(InjectorImpl injector,
Key<T> key,
InjectionPoint constructorInjector,
java.lang.Object source,
Scoping scoping,
Errors errors,
boolean failIfNotLinked,
boolean failIfNotExplicit) |
private <T> ConstructorInjector<T> |
ConstructorInjectorStore.createConstructor(InjectionPoint injectionPoint,
Errors errors) |
static void |
Errors.formatInjectionPoint(java.util.Formatter formatter,
Dependency<?> dependency,
InjectionPoint injectionPoint,
ElementSource elementSource) |
ConstructorInjector<?> |
ConstructorInjectorStore.get(InjectionPoint constructorInjector,
Errors errors)
Returns a new complete constructor injector with injection listeners registered.
|
(package private) boolean |
ConstructorInjectorStore.remove(InjectionPoint ip)
Purges an injection point from the cache.
|
private void |
InjectorImpl.removeFailedJitBinding(Binding<?> binding,
InjectionPoint ip)
Cleans up any state that may have been cached when constructing the JIT binding.
|
Modifier and Type | Method and Description |
---|---|
(package private) com.google.common.collect.ImmutableList<SingleMemberInjector> |
MembersInjectorStore.getInjectors(java.util.Set<InjectionPoint> injectionPoints,
Errors errors)
Returns the injectors for the specified injection points.
|
(package private) <T> Initializable<T> |
Initializer.requestInjection(InjectorImpl injector,
T instance,
Binding<T> binding,
java.lang.Object source,
java.util.Set<InjectionPoint> injectionPoints)
Registers an instance for member injection when that step is performed.
|
Constructor and Description |
---|
ConstructorBindingImpl(InjectorImpl injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> scopedFactory,
Scoping scoping,
ConstructorBindingImpl.Factory<T> factory,
InjectionPoint constructorInjectionPoint) |
ConstructorBindingImpl(Key<T> key,
java.lang.Object source,
Scoping scoping,
InjectionPoint constructorInjectionPoint,
java.util.Set<InjectionPoint> injectionPoints) |
DefaultConstructionProxyFactory(InjectionPoint injectionPoint) |
FastClassProxy(InjectionPoint injectionPoint,
java.lang.reflect.Constructor<T> constructor,
net.sf.cglib.reflect.FastClass fc,
int index) |
ProxyConstructor(net.sf.cglib.proxy.Enhancer enhancer,
InjectionPoint injectionPoint,
net.sf.cglib.proxy.Callback[] callbacks,
com.google.common.collect.ImmutableMap<java.lang.reflect.Method,java.util.List<org.aopalliance.intercept.MethodInterceptor>> methodInterceptors) |
ProxyFactory(InjectionPoint injectionPoint,
java.lang.Iterable<MethodAspect> methodAspects) |
ReflectiveProxy(InjectionPoint injectionPoint,
java.lang.reflect.Constructor<T> constructor) |
SingleFieldInjector(InjectorImpl injector,
InjectionPoint injectionPoint,
Errors errors) |
SingleMethodInjector(InjectorImpl injector,
InjectionPoint injectionPoint,
Errors errors) |
Constructor and Description |
---|
ConstructorBindingImpl(Key<T> key,
java.lang.Object source,
Scoping scoping,
InjectionPoint constructorInjectionPoint,
java.util.Set<InjectionPoint> injectionPoints) |
ConstructorInjector(java.util.Set<InjectionPoint> injectableMembers,
ConstructionProxy<T> constructionProxy,
SingleParameterInjector<?>[] parameterInjectors,
MembersInjectorImpl<T> membersInjector) |
InstanceBindingImpl(InjectorImpl injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
java.util.Set<InjectionPoint> injectionPoints,
T instance) |
InstanceBindingImpl(java.lang.Object source,
Key<T> key,
Scoping scoping,
java.util.Set<InjectionPoint> injectionPoints,
T instance) |
ProviderInstanceBindingImpl(InjectorImpl injector,
Key<T> key,
java.lang.Object source,
InternalFactory<? extends T> internalFactory,
Scoping scoping,
javax.inject.Provider<? extends T> providerInstance,
java.util.Set<InjectionPoint> injectionPoints) |
ProviderInstanceBindingImpl(java.lang.Object source,
Key<T> key,
Scoping scoping,
java.util.Set<InjectionPoint> injectionPoints,
javax.inject.Provider<? extends T> providerInstance) |
Modifier and Type | Method and Description |
---|---|
<T> Key<T> |
MultibindingsScanner.Scanner.prepareMethod(Binder binder,
java.lang.annotation.Annotation annotation,
Key<T> key,
InjectionPoint injectionPoint) |
Modifier and Type | Field and Description |
---|---|
private InjectionPoint |
Dependency.injectionPoint |
Modifier and Type | Method and Description |
---|---|
static <T> InjectionPoint |
InjectionPoint.forConstructor(java.lang.reflect.Constructor<T> constructor)
Returns a new injection point for the specified constructor.
|
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(java.lang.Class<?> type)
Returns a new injection point for the injectable constructor of
type . |
static InjectionPoint |
InjectionPoint.forConstructorOf(TypeLiteral<?> type)
Returns a new injection point for the injectable constructor of
type . |
static <T> InjectionPoint |
InjectionPoint.forMethod(java.lang.reflect.Method method,
TypeLiteral<T> type)
Returns a new injection point for the specified method of
type . |
InjectionPoint |
ConstructorBinding.getConstructor()
Gets the constructor this binding injects.
|
InjectionPoint |
Dependency.getInjectionPoint()
Returns the injection point to which this dependency belongs, or null if this dependency isn't
attached to a particular injection point.
|
(package private) abstract InjectionPoint |
InjectionPoint.InjectableMember.toInjectionPoint() |
(package private) InjectionPoint |
InjectionPoint.InjectableField.toInjectionPoint() |
(package private) InjectionPoint |
InjectionPoint.InjectableMethod.toInjectionPoint() |
Modifier and Type | Method and Description |
---|---|
static java.util.Set<InjectionPoint> |
InjectionPoint.forInstanceMethodsAndFields(java.lang.Class<?> type)
Returns all instance method and field injection points on
type . |
static java.util.Set<InjectionPoint> |
InjectionPoint.forInstanceMethodsAndFields(TypeLiteral<?> type)
Returns all instance method and field injection points on
type . |
static java.util.Set<InjectionPoint> |
InjectionPoint.forStaticMethodsAndFields(java.lang.Class<?> type)
Returns all static method and field injection points on
type . |
static java.util.Set<InjectionPoint> |
InjectionPoint.forStaticMethodsAndFields(TypeLiteral<?> type)
Returns all static method and field injection points on
type . |
java.util.Set<InjectionPoint> |
ConstructorBinding.getInjectableMembers()
Returns all instance method and field injection points on
type . |
java.util.Set<InjectionPoint> |
InjectionRequest.getInjectionPoints()
Returns the instance methods and fields of
instance that will be injected to fulfill
this request. |
java.util.Set<InjectionPoint> |
InstanceBinding.getInjectionPoints()
Returns the field and method injection points of the instance, injected at injector-creation
time only.
|
java.util.Set<InjectionPoint> |
ProviderInstanceBinding.getInjectionPoints()
Returns the field and method injection points of the provider, injected at injector-creation
time only.
|
java.util.Set<InjectionPoint> |
StaticInjectionRequest.getInjectionPoints()
Returns the static methods and fields of
type that will be injected to fulfill this
request. |
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.
|
Modifier and Type | Method and Description |
---|---|
abstract <T> Key<T> |
ModuleAnnotatedMethodScanner.prepareMethod(Binder binder,
java.lang.annotation.Annotation annotation,
Key<T> key,
InjectionPoint injectionPoint)
Prepares a method for binding.
|
Modifier and Type | Method and Description |
---|---|
static java.util.Set<Dependency<?>> |
Dependency.forInjectionPoints(java.util.Set<InjectionPoint> injectionPoints)
Returns the dependencies from the given injection points.
|
Constructor and Description |
---|
Dependency(InjectionPoint injectionPoint,
Key<T> key,
boolean nullable,
int parameterIndex) |