Package com.google.inject.assistedinject
Class FactoryProvider2.AssistData
- java.lang.Object
-
- com.google.inject.assistedinject.FactoryProvider2.AssistData
-
- All Implemented Interfaces:
AssistedMethod
- Enclosing class:
- FactoryProvider2<F>
private static class FactoryProvider2.AssistData extends java.lang.Object implements AssistedMethod
All the data necessary to perform an assisted inject.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Binding<?>
cachedBinding
used to perform optimized factory creations.(package private) java.lang.reflect.Constructor<?>
constructor
the constructor the implementation is constructed with.(package private) java.util.Set<Dependency<?>>
dependencies
All non-assisted dependencies required by this method.(package private) java.lang.reflect.Method
factoryMethod
The factory method associated with this data(package private) TypeLiteral<?>
implementationType
the type of the implementation constructed(package private) boolean
optimized
(package private) com.google.common.collect.ImmutableList<Key<?>>
paramTypes
the parameters in the factory method associated with this data.(package private) java.util.List<FactoryProvider2.ThreadLocalProvider>
providers
the list of optimized providers, empty if not optimized.(package private) Key<?>
returnType
the return type in the factory method that the constructor is bound to.
-
Constructor Summary
Constructors 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<Dependency<?>>
getDependencies()
Returns all non-assisted dependencies required to construct and inject the implementation.java.lang.reflect.Method
getFactoryMethod()
Returns the factory method that is being assisted.java.lang.reflect.Constructor<?>
getImplementationConstructor()
Returns the constructor that will be used to construct instances of the implementation.TypeLiteral<?>
getImplementationType()
Returns the implementation type that will be created when the method is used.java.lang.String
toString()
-
-
-
Field Detail
-
constructor
final java.lang.reflect.Constructor<?> constructor
the constructor the implementation is constructed with.
-
returnType
final Key<?> returnType
the return type in the factory method that the constructor is bound to.
-
paramTypes
final com.google.common.collect.ImmutableList<Key<?>> paramTypes
the parameters in the factory method associated with this data.
-
implementationType
final TypeLiteral<?> implementationType
the type of the implementation constructed
-
dependencies
final java.util.Set<Dependency<?>> dependencies
All non-assisted dependencies required by this method.
-
factoryMethod
final java.lang.reflect.Method factoryMethod
The factory method associated with this data
-
optimized
final boolean optimized
-
providers
final java.util.List<FactoryProvider2.ThreadLocalProvider> providers
the list of optimized providers, empty if not optimized.
-
cachedBinding
volatile Binding<?> cachedBinding
used to perform optimized factory creations.
-
-
Constructor Detail
-
AssistData
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)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getDependencies
public java.util.Set<Dependency<?>> getDependencies()
Description copied from interface:AssistedMethod
Returns all non-assisted dependencies required to construct and inject the implementation.- Specified by:
getDependencies
in interfaceAssistedMethod
-
getFactoryMethod
public java.lang.reflect.Method getFactoryMethod()
Description copied from interface:AssistedMethod
Returns the factory method that is being assisted.- Specified by:
getFactoryMethod
in interfaceAssistedMethod
-
getImplementationConstructor
public java.lang.reflect.Constructor<?> getImplementationConstructor()
Description copied from interface:AssistedMethod
Returns the constructor that will be used to construct instances of the implementation.- Specified by:
getImplementationConstructor
in interfaceAssistedMethod
-
getImplementationType
public TypeLiteral<?> getImplementationType()
Description copied from interface:AssistedMethod
Returns the implementation type that will be created when the method is used.- Specified by:
getImplementationType
in interfaceAssistedMethod
-
-