Generated by
JDiff

com.google.inject Documentation Differences

This file contains all the changes in documentation in the package com.google.inject as colored differences. Deletions are shown like this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.

Class Binder, void bindInterceptor(Matcher<Class<?>>, Matcher<Method>, MethodInterceptor[])

Binds method interceptor[s] to methods matched by class and method matchers. A method is eligible for interception if: @param classMatcher matches classes the interceptor should apply to. For example: {@code only(Runnable.class)}. @param methodMatcher matches methods the interceptor should apply to. For example: {@code annotatedWith(Transactional.class)}. @param interceptors to bind. The interceptors are called in the order they are given.
Class Binder, void requireExplicitBindings()

Instructs the Injector that bindings must be listed in a Module in order to be injected. Classes that are not explicitly bound in a module cannot be injected. Bindings created through a linked bindingbinding ( bind(Foo.class).to(FooImpl.class)) are allowed, but the implicit binding (FooImpl) cannot be directly injected unless it is also explicitly bound (bind(FooImpl.class)).

Tools can still retrieve bindings for implicit bindings (bindings created through a linked binding) if explicit bindings are required, however Binding.getProvider will fail.

By default, explicit bindings are not required.

If a parent injector requires explicit bindings, then all child injectors (and private modules within that injector) also require explicit bindings. If a parent does not require explicit bindings, a child injector or private module may optionally declare itself as requiring explicit bindings. If it does, the behavior is limited only to that child or any grandchildren. No siblings of the child will require explicit bindings.

IfIn the parent didabsence not requireof an explicit bindingsbinding butfor the child doestarget, it is possible that alinked bindings in child injectors linkedcreate a binding for the target in the childparent. may add a JIT bindingSince this behavior can be tosurprising, the it parent.causes The child will not be allowed toan error instead if explicit bindings are referencerequired. the target binding directlyTo avoid this error, butadd the parent and other childrenan explicit binding for the oftarget, the parent may be ableeither in the child or tothe parent. @since 3.0


Class Guice, Injector createInjector(Iterable<Module>)

Creates an injector for the given set of modules. This is equivalent to calling .createInjector(Stage, Iterable) with Stage.DEVELOPMENT. @throws CreationException if one or more errors occur during injector creation
Class Guice, Injector createInjector(Module[])

Creates an injector for the given set of modules. This is equivalent to calling .createInjector(Stage, Module...) with Stage.DEVELOPMENT. @throws CreationException if one or more errors occur during injector construction

Class Inject

Annotates members of your implementation class (constructors, methods and fields) into which the Injector should inject values. The Injector fulfills injection requests for: In all cases, a member can be injected regardless of its Java access specifier (private, default, protected, public). @author crazybob@google.com (Bob Lee)

Class Key

Binding key consisting of an injection type and an optional annotation. Matches the type and annotation at a point of injection.

For example, {@code Key.get(Service.class, Transactional.class)} will match:

   {@literal @}Inject
   public void setService({@literal @}Transactional Service service) {
     ...
   }
 

{@code Key} supports generic types via subclassing just like TypeLiteral.

Keys do not differentiate between primitive types (int, char, etc.) and their correpsondingcorresponding wrapper types (Integer, Character, etc.). Primitive types will be replaced with their wrapper types when keys are created. @author crazybob@google.com (Bob Lee)

Class Key, boolean hasAttributes()

Returns true if this key has annotation attributes. @since 3.0
Class Key, Key<T> ofType(Class<T>)

Returns a new key of the specified type with the same annotation as this key. @since 3.0
Class Key, Key<?> ofType(Type)

Returns a new key of the specified type with the same annotation as this key. @since 3.0
Class Key, Key<T> ofType(TypeLiteral<T>)

Returns a new key of the specified type with the same annotation as this key. @since 3.0
Class Key, Key<T> withoutAttributes()

Returns this key without annotation attributes, i.e. with only the annotation type. @since 3.0

Class Provides

Annotates methods of a Module to create a provider method binding. The method's return type is bound to it'sits returned value. Guice will pass dependencies to the method as parameters. @author crazybob@google.com (Bob Lee) @since 2.0