com.google.inject.spi.TypeEncounter<I> |
Context of an injectable type encounter. Enables reporting errors, registering injection
listeners and binding method interceptors for injectable type I
. It is an error to use
an encounter after the hear()
method has
returned.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Records an error message for type
I which will be presented to the user at a later
time. | |||||||||||
Records an exception for type
I , the full details of which will be logged, and the
message of which will be presented to the user at a later time. | |||||||||||
Records an error message to be presented to the user at a later time.
| |||||||||||
Binds method interceptor[s] to methods matched in type
I and its supertypes. | |||||||||||
Returns the members injector used to inject dependencies into methods and fields on instances
of the given type
T . | |||||||||||
Returns the members injector used to inject dependencies into methods and fields on instances
of the given type
T . | |||||||||||
Returns the provider used to obtain instances for the given injection key.
| |||||||||||
Returns the provider used to obtain instances for the given injection type.
| |||||||||||
Registers an injection listener for type
I . | |||||||||||
Registers a members injector for type
I . |
Records an error message for type I
which will be presented to the user at a later
time. Unlike throwing an exception, this enable us to continue configuring the Injector and
discover more errors. Uses format(String, Object[])
to insert the arguments
into the message.
Records an exception for type I
, the full details of which will be logged, and the
message of which will be presented to the user at a later time. If your type listener calls
something that you worry may fail, you should catch the exception and pass it to this method.
Records an error message to be presented to the user at a later time.
Binds method interceptor[s] to methods matched in type I
and its supertypes. A
method is eligible for interception if:
methodMatcher | matches methods the interceptor should apply to. For
example: annotatedWith(Transactional.class) . |
---|---|
interceptors | to bind |
Returns the members injector used to inject dependencies into methods and fields on instances
of the given type T
. The returned members injector will not be valid until the main
injector has been created. The members injector will throw an IllegalStateException
if you try to use it beforehand.
typeLiteral | type to get members injector for |
---|
Returns the members injector used to inject dependencies into methods and fields on instances
of the given type T
. The returned members injector will not be valid until the main
injector has been created. The members injector will throw an IllegalStateException
if you try to use it beforehand.
type | type to get members injector for |
---|
Returns the provider used to obtain instances for the given injection key. The returned
provider will not be valid until the injector has been created. The provider will throw an
IllegalStateException
if you try to use it beforehand.
Returns the provider used to obtain instances for the given injection type. The returned
provider will not be valid until the injetor has been created. The provider will throw an
IllegalStateException
if you try to use it beforehand.
Registers an injection listener for type I
. Guice will notify the listener after all
injections have been performed on an instance of I
.
Registers a members injector for type I
. Guice will use the members injector after its
performed its own injections on an instance of I
.