| Modifier and Type | Class and Description |
|---|---|
| private static class | ProviderMethod.
A |
| private static class | ProviderMethod.
A |
| Modifier and Type | Field and Description |
|---|---|
| private final Annotation | |
| private final ImmutableSet | |
| private final boolean | |
| protected final Object | |
| private final Key | |
| protected final Method | |
| private SingleParameterInjector | parameterInjectors
Set by |
| private final Class |
| Access | Constructor and Description |
|---|---|
| pack-priv | ProviderMethod(Key<T> key, Method
the method to invoke. Its return type must be the same type as method, Object instance, ImmutableSet<Dependency<?>> dependencies, Class<? extends Annotation> scopeAnnotation, Annotation annotation)key.
|
| Modifier and Type | Method and Description |
|---|---|
| public <B, V> V | acceptExtensionVisitor(BindingTargetVisitor<B, V> visitor, ProviderInstanceBinding<? extends B> binding)
Implements com. |
| public void | |
| pack-priv static <T> ProviderMethod | create(Key<T> key, Method method, Object instance, ImmutableSet<Dependency<?>> dependencies, Class<? extends Annotation> scopeAnnotation, boolean skipFastClassGeneration, Annotation annotation)
Creates a |
| protected T | doProvision(InternalContext context, Dependency<?> dependency)
Implements abstract com. |
| pack-priv abstract T | doProvision(Object[] parameters)
Extension point for our subclasses to implement the provisioning strategy. |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public Annotation | getAnnotation()
Implements com. |
| public Set | getDependencies()
Implements com. |
| public Object | getEnclosingInstance()
Implements com. |
| public Object | |
| public Key | getKey()
Implements com. |
| public Method | getMethod()
Implements com. |
| public int | |
| pack-priv void | initialize(InjectorImpl injector, Errors errors)
Implements abstract com. |
| public String |
| annotation | back to summary |
|---|---|
| private final Annotation annotation | |
| dependencies | back to summary |
|---|---|
| private final ImmutableSet<Dependency<?>> dependencies | |
| exposed | back to summary |
|---|---|
| private final boolean exposed | |
| instance | back to summary |
|---|---|
| protected final Object instance | |
| key | back to summary |
|---|---|
| private final Key<T> key | |
| method | back to summary |
|---|---|
| protected final Method method | |
| parameterInjectors | back to summary |
|---|---|
| private SingleParameterInjector<?>[] parameterInjectors Set by | |
| scopeAnnotation | back to summary |
|---|---|
| private final Class<? extends Annotation> scopeAnnotation | |
| ProviderMethod | back to summary |
|---|---|
pack-priv ProviderMethod(Key<T> key, Method method, Object instance, ImmutableSet<Dependency<?>> dependencies, Class<? extends Annotation> scopeAnnotation, Annotation annotation)
| |
| acceptExtensionVisitor | back to summary |
|---|---|
| public <B, V> V acceptExtensionVisitor(BindingTargetVisitor<B, V> visitor, ProviderInstanceBinding<? extends B> binding) Implements com. Doc from com. Instructs the extension determine if the visitor is an instance of a custom extension visitor, and if so, visit it using that method. If the visitor is not an instance of the custom extension visitor, this method MUST call visitor.visit(binding). Due to issues with generics, the type parameters of this method do not relate to the type of the provider. In practice, the 'B' type will always be a supertype of 'T'.
| |
| configure | back to summary |
|---|---|
| public void configure(Binder binder) | |
| create | back to summary |
|---|---|
| pack-priv static <T> ProviderMethod Creates a Unless | |
| doProvision | back to summary |
|---|---|
| protected T doProvision(InternalContext context, Dependency<?> dependency) throws InternalProvisionException Implements abstract com. Doc from com. Creates an object to be injected.
| |
| doProvision | back to summary |
|---|---|
| pack-priv abstract T doProvision(Object[] parameters) throws IllegalAccessException, InvocationTargetException Extension point for our subclasses to implement the provisioning strategy. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getAnnotation | back to summary |
|---|---|
| public Annotation getAnnotation() Implements com. Doc from com. Returns the annotation that caused this binding to be created. For
| |
| getDependencies | back to summary |
|---|---|
| public Set Implements com. Doc from com. Returns the known dependencies for this type. If this has dependencies whose values are not
known statically, a dependency for the
| |
| getEnclosingInstance | back to summary |
|---|---|
| public Object getEnclosingInstance() Implements com. Doc from com. Returns the instance of the object the method is defined in.
| |
| getInstance | back to summary |
|---|---|
| public Object getInstance() | |
| getKey | back to summary |
|---|---|
| public Key Implements com. Doc from com. Returns the key of the binding.
| |
| getMethod | back to summary |
|---|---|
| public Method getMethod() Implements com. Doc from com. Returns the method this binding uses.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| initialize | back to summary |
|---|---|
| pack-priv void initialize(InjectorImpl injector, Errors errors) throws ErrorsException Implements abstract com. Doc from com. A callback that allows for implementations to fetch dependencies on other bindings. Will be called exactly once, prior to any call to
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
ProviderMethod implementation that uses bytecode generation to invoke the provider
method.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final BiFunction |
| Access | Constructor and Description |
|---|---|
| pack-priv | FastClassProviderMethod(Key<T> key, Method method, Object instance, ImmutableSet<Dependency<?>> dependencies, Class<? extends Annotation> scopeAnnotation, Annotation annotation, BiFunction<Object, Object[], Object> fastMethod)
|
| Modifier and Type | Method and Description |
|---|---|
| public T | doProvision(Object[] parameters)
Implements abstract com. |
| fastMethod | back to summary |
|---|---|
| pack-priv final BiFunction<Object, Object[], Object> fastMethod | |
| FastClassProviderMethod | back to summary |
|---|---|
| pack-priv FastClassProviderMethod(Key<T> key, Method method, Object instance, ImmutableSet<Dependency<?>> dependencies, Class<? extends Annotation> scopeAnnotation, Annotation annotation, BiFunction<Object, Object[], Object> fastMethod) | |
| doProvision | back to summary |
|---|---|
| public T doProvision(Object[] parameters) throws InvocationTargetException Implements abstract com. Doc from com. Extension point for our subclasses to implement the provisioning strategy.
| |
ProviderMethod implementation that invokes the method using normal java reflection.
| Access | Constructor and Description |
|---|---|
| pack-priv | ReflectionProviderMethod(Key<T> key, Method method, Object instance, ImmutableSet<Dependency<?>> dependencies, Class<? extends Annotation> scopeAnnotation, Annotation annotation)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv T | doProvision(Object[] parameters)
Implements abstract com. |
| ReflectionProviderMethod | back to summary |
|---|---|
| pack-priv ReflectionProviderMethod(Key<T> key, Method method, Object instance, ImmutableSet<Dependency<?>> dependencies, Class<? extends Annotation> scopeAnnotation, Annotation annotation) | |
| doProvision | back to summary |
|---|---|
| pack-priv T doProvision(Object[] parameters) throws IllegalAccessException, InvocationTargetException Implements abstract com. Doc from com. Extension point for our subclasses to implement the provisioning strategy.
| |