Package com.google.inject.internal
Class ProviderMethod.FastClassProviderMethod<T>
- java.lang.Object
-
- com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory<T>
-
- com.google.inject.internal.InternalProviderInstanceBindingImpl.CyclicFactory<T>
-
- com.google.inject.internal.ProviderMethod<T>
-
- com.google.inject.internal.ProviderMethod.FastClassProviderMethod<T>
-
- All Implemented Interfaces:
InternalFactory<T>
,Provider<T>
,HasDependencies
,ProviderWithExtensionVisitor<T>
,ProvidesMethodBinding<T>
,javax.inject.Provider<T>
- Enclosing class:
- ProviderMethod<T>
private static final class ProviderMethod.FastClassProviderMethod<T> extends ProviderMethod<T>
AProviderMethod
implementation that uses bytecode generation to invoke the provider method.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.function.BiFunction<java.lang.Object,java.lang.Object[],java.lang.Object>
fastMethod
-
Fields inherited from class com.google.inject.internal.ProviderMethod
instance, method
-
Fields inherited from class com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory
provisionCallback
-
-
Constructor Summary
Constructors Constructor Description FastClassProviderMethod(Key<T> key, java.lang.reflect.Method method, java.lang.Object instance, com.google.common.collect.ImmutableSet<Dependency<?>> dependencies, java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation, java.lang.annotation.Annotation annotation, java.util.function.BiFunction<java.lang.Object,java.lang.Object[],java.lang.Object> fastMethod)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
doProvision(java.lang.Object[] parameters)
Extension point for our subclasses to implement the provisioning strategy.-
Methods inherited from class com.google.inject.internal.ProviderMethod
acceptExtensionVisitor, configure, create, doProvision, equals, getAnnotation, getDependencies, getEnclosingInstance, getInstance, getKey, getMethod, hashCode, initialize, toString
-
Methods inherited from class com.google.inject.internal.InternalProviderInstanceBindingImpl.CyclicFactory
get
-
Methods inherited from class com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory
get, getSource
-
-
-
-
Constructor Detail
-
FastClassProviderMethod
FastClassProviderMethod(Key<T> key, java.lang.reflect.Method method, java.lang.Object instance, com.google.common.collect.ImmutableSet<Dependency<?>> dependencies, java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation, java.lang.annotation.Annotation annotation, java.util.function.BiFunction<java.lang.Object,java.lang.Object[],java.lang.Object> fastMethod)
-
-
Method Detail
-
doProvision
public T doProvision(java.lang.Object[] parameters) throws java.lang.reflect.InvocationTargetException
Description copied from class:ProviderMethod
Extension point for our subclasses to implement the provisioning strategy.- Specified by:
doProvision
in classProviderMethod<T>
- Throws:
java.lang.reflect.InvocationTargetException
-
-