Top Description Inners Fields Constructors Methods
com.google.inject.internal

pack-priv abstract Class AbstractBindingProcessor

extends AbstractProcessor
Class Inheritance
Known Direct Subclasses
com.google.inject.internal.BindingProcessor, com.google.inject.internal.UntargettedBindingProcessor
Imports
com.google.common.collect.ImmutableSet, com.google.inject.AbstractModule, .Binder, .Binding, .Injector, .Key, .MembersInjector, .Module, .Provider, .Scope, .Stage, .TypeLiteral, com.google.inject.spi.DefaultBindingTargetVisitor

Guarantees that processing of Binding elements happens in a sane way.
Author
[email protected] (Sam Berlin)

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv abstract class
AbstractBindingProcessor.Processor<T, V>

Processor for visiting bindings.

Field Summary

Modifier and TypeField and Description
private static final ImmutableSet<Class<?>>
protected final ProcessedBindingData
Inherited from com.google.inject.internal.AbstractProcessor:
errorsinjector

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected <T> UntargettedBindingImpl<T>
invalidBinding(InjectorImpl injector, Key<T> key, Object source)

private static boolean
isOkayDuplicate(BindingImpl<?>
the binding in the parent injector (candidate for an exposing binding)
original
,
BindingImpl<?>
the binding to check (candidate for the exposed binding)
binding
,
InjectorBindingData bindingData)

We tolerate duplicate bindings if one exposes the other or if the two bindings are considered duplicates (see Bindings#areDuplicates(BindingImpl, BindingImpl).

protected void
putBinding(BindingImpl<?> binding)

private <T> void
validateKey(Object source, Key<T> key)

Inherited from com.google.inject.internal.AbstractProcessor:
processprocessvisitOther

Field Detail

FORBIDDEN_TYPESback to summary
private static final ImmutableSet<Class<?>> FORBIDDEN_TYPES
processedBindingDataback to summary
protected final ProcessedBindingData processedBindingData

Constructor Detail

AbstractBindingProcessorback to summary
pack-priv AbstractBindingProcessor(Errors errors, ProcessedBindingData processedBindingData)

Method Detail

invalidBindingback to summary
protected <T> UntargettedBindingImpl<T> invalidBinding(InjectorImpl injector, Key<T> key, Object source)
isOkayDuplicateback to summary
private static boolean isOkayDuplicate(BindingImpl<?> original, BindingImpl<?> binding, InjectorBindingData bindingData)

We tolerate duplicate bindings if one exposes the other or if the two bindings are considered duplicates (see Bindings#areDuplicates(BindingImpl, BindingImpl).

Parameters
original:BindingImpl<?>

the binding in the parent injector (candidate for an exposing binding)

binding:BindingImpl<?>

the binding to check (candidate for the exposed binding)

putBindingback to summary
protected void putBinding(BindingImpl<?> binding)
validateKeyback to summary
private <T> void validateKey(Object source, Key<T> key)
com.google.inject.internal back to summary

pack-priv abstract Class AbstractBindingProcessor.Processor<T, V>

extends DefaultBindingTargetVisitor<T, V>
Class Inheritance

Processor for visiting bindings. Each overridden method that wants to actually process the binding should call prepareBinding first.

Field Summary

Modifier and TypeField and Description
pack-priv final Key<T>
pack-priv final Class<? super T>
pack-priv Scoping
pack-priv final Object

Constructor Summary

AccessConstructor and Description
pack-priv
Processor(BindingImpl<T> binding)

Method Summary

Modifier and TypeMethod and Description
private void
protected void
protected void
scheduleDelayedInitialization(BindingImpl<?> binding)

Schedule initialization for this binding to occur after all other static initialization of bindings.

protected void
scheduleInitialization(BindingImpl<?> binding)

Schedule initialization of this binding to occur immediately after all bindings have been initially processed.

Inherited from com.google.inject.spi.DefaultBindingTargetVisitor:
visitvisitvisitvisitvisitvisitvisitvisitvisitvisitOther

Field Detail

keyback to summary
pack-priv final Key<T> key
rawTypeback to summary
pack-priv final Class<? super T> rawType
scopingback to summary
pack-priv Scoping scoping
sourceback to summary
pack-priv final Object source

Constructor Detail

Processorback to summary
pack-priv Processor(BindingImpl<T> binding)

Method Detail

initializeBindingback to summary
private void initializeBinding(BindingImpl<?> binding)
prepareBindingback to summary
protected void prepareBinding()
scheduleDelayedInitializationback to summary
protected void scheduleDelayedInitialization(BindingImpl<?> binding)

Schedule initialization for this binding to occur after all other static initialization of bindings.

scheduleInitializationback to summary
protected void scheduleInitialization(BindingImpl<?> binding)

Schedule initialization of this binding to occur immediately after all bindings have been initially processed.