final class ConstructorBindingImpl<T> extends BindingImpl<T> implements ConstructorBinding<T>, DelayedInitialize
| Modifier and Type | Class and Description |
|---|---|
private static class |
ConstructorBindingImpl.Factory<T> |
| Modifier and Type | Field and Description |
|---|---|
private InjectionPoint |
constructorInjectionPoint |
private ConstructorBindingImpl.Factory<T> |
factory |
| Modifier | Constructor and Description |
|---|---|
private |
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) |
| Modifier and Type | Method and Description |
|---|---|
<V> V |
acceptTargetVisitor(BindingTargetVisitor<? super T,V> visitor)
Accepts a target visitor.
|
void |
applyTo(Binder binder)
Writes this module element to the given binder (optional operation).
|
(package private) static <T> ConstructorBindingImpl<T> |
create(InjectorImpl injector,
Key<T> key,
InjectionPoint constructorInjector,
java.lang.Object source,
Scoping scoping,
Errors errors,
boolean failIfNotLinked,
boolean failIfNotExplicit) |
boolean |
equals(java.lang.Object obj) |
InjectionPoint |
getConstructor()
Gets the constructor this binding injects.
|
java.util.Set<Dependency<?>> |
getDependencies()
Returns the known dependencies for this type.
|
java.util.Set<InjectionPoint> |
getInjectableMembers()
Returns all instance method and field injection points on
type. |
(package private) InjectionPoint |
getInternalConstructor()
Returns an injection point that can be used to clean up the constructor store.
|
(package private) java.util.Set<Dependency<?>> |
getInternalDependencies()
Returns a set of dependencies that can be iterated over to clean up stray JIT bindings.
|
java.util.Map<java.lang.reflect.Method,java.util.List<org.aopalliance.intercept.MethodInterceptor>> |
getMethodInterceptors()
Returns the interceptors applied to each method, in the order that they will be applied.
|
private static boolean |
hasAtInject(java.lang.reflect.Constructor cxtor)
Returns true if the inject annotation is on the constructor.
|
int |
hashCode() |
void |
initialize(InjectorImpl injector,
Errors errors)
Initializes this binding, throwing any errors if necessary.
|
(package private) boolean |
isInitialized()
True if this binding has been initialized and is ready for use.
|
java.lang.String |
toString() |
protected BindingImpl<T> |
withKey(Key<T> key) |
protected BindingImpl<T> |
withScoping(Scoping scoping) |
acceptScopingVisitor, acceptVisitor, getInjector, getInternalFactory, getKey, getProvider, getScoping, getSource, isConstantclone, finalize, getClass, notify, notifyAll, wait, wait, waitacceptScopingVisitor, getKey, getProvideracceptVisitor, getSourceprivate final ConstructorBindingImpl.Factory<T> factory
private final InjectionPoint constructorInjectionPoint
private ConstructorBindingImpl(InjectorImpl injector, Key<T> key, java.lang.Object source, InternalFactory<? extends T> scopedFactory, Scoping scoping, ConstructorBindingImpl.Factory<T> factory, InjectionPoint constructorInjectionPoint)
public ConstructorBindingImpl(Key<T> key, java.lang.Object source, Scoping scoping, InjectionPoint constructorInjectionPoint, java.util.Set<InjectionPoint> injectionPoints)
static <T> ConstructorBindingImpl<T> create(InjectorImpl injector, Key<T> key, InjectionPoint constructorInjector, java.lang.Object source, Scoping scoping, Errors errors, boolean failIfNotLinked, boolean failIfNotExplicit) throws ErrorsException
constructorInjector - the constructor to use, or null to use the default.failIfNotLinked - true if this ConstructorBindingImpl's InternalFactory should
only succeed if retrieved from a linked bindingErrorsExceptionprivate static boolean hasAtInject(java.lang.reflect.Constructor cxtor)
public void initialize(InjectorImpl injector, Errors errors) throws ErrorsException
DelayedInitializeinitialize in interface DelayedInitializeErrorsExceptionboolean isInitialized()
InjectionPoint getInternalConstructor()
java.util.Set<Dependency<?>> getInternalDependencies()
public <V> V acceptTargetVisitor(BindingTargetVisitor<? super T,V> visitor)
BindingacceptTargetVisitor in interface Binding<T>visitor - to call back onpublic InjectionPoint getConstructor()
ConstructorBindinggetConstructor in interface ConstructorBinding<T>public java.util.Set<InjectionPoint> getInjectableMembers()
ConstructorBindingtype.getInjectableMembers in interface ConstructorBinding<T>public java.util.Map<java.lang.reflect.Method,java.util.List<org.aopalliance.intercept.MethodInterceptor>> getMethodInterceptors()
ConstructorBindinggetMethodInterceptors in interface ConstructorBinding<T>public java.util.Set<Dependency<?>> getDependencies()
HasDependenciesInjector will be
included in the returned set.getDependencies in interface HasDependenciesprotected BindingImpl<T> withScoping(Scoping scoping)
withScoping in class BindingImpl<T>protected BindingImpl<T> withKey(Key<T> key)
withKey in class BindingImpl<T>public void applyTo(Binder binder)
Elementpublic java.lang.String toString()
toString in class BindingImpl<T>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object