|
Generated by JDiff |
||||||||
PREV PACKAGE NEXT PACKAGE FRAMES NO FRAMES |
This file contains all the changes in documentation in the packagecom.google.inject.util
as colored differences. Deletions are shownlike 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.
Returns a builder that creates a module that overlays override modules over theClass Modules, OverriddenModuleBuilder override(Module[])givengiven modules. If a key is bound in both sets of modules, only the binding from the overridemodulesmodules is kept. If a single PrivateModule is supplied or all elements arefromfrom a single PrivateBinder, then this will overwrite the private bindings.Otherwise, private bindingswillwill not be overwritten unless they are exposed.This can be used to replace the bindings ofaa production module with test bindings:Module functionalTestModule = Modules.override(getProductionModules()).with(getTestModules());Prefer to write smaller modules that can be reused and tested without overrides. @param modules the modules whose bindings are open to be overridden
Returns a builder that creates a module that overlays override modules over thegivengiven modules. If a key is bound in both sets of modules, only the binding from the overridemodulesmodules is kept. If a single PrivateModule is supplied or all elements arefromfrom a single PrivateBinder, then this will overwrite the private bindings.Otherwise, private bindingswillwill not be overwritten unless they are exposed.This can be used to replace the bindings ofaa production module with test bindings:Module functionalTestModule = Modules.override(new ProductionModule()).with(new TestModule());Prefer to write smaller modules that can be reused and tested without overrides. @param modules the modules whose bindings are open to be overridden
Static utility methods for creating and working with instancesClass Providers, Provider<T> guicify(Provider<T>)ofof Provider. @author Kevin Bourrillion (kevinb9n@gmail.com) @since 2.0
Returns a Guice-friendly {@code com.google.inject.Provider} for theClass Providers, Provider<T> of(T)givengiven JSR-330 {@codecode javax.inject.Provider}. The converse method is unnecessary,since Guice providersdirectlydirectly implement the JSR-330 interface.@since 3.0
Returns a provider which always provides {@code instance}.This shouldnotnot be necessary touseuse in your application, but is helpful for severaltypestypes of unit tests. @param instance the instance that should always be provided.This isalsoalsopermitted to be null, to enable aggressive testing, although inrealreal life a Guice-supplied Provider willnevernever return null.
Returns an array type whose elements are all instancesClass Types, ParameterizedType collectionOf(Type)ofof {@code componentType}. @return a serializable generic array type.
Returns a type modelling a Collection whose elements are ofClass Types, Type javaxProviderOf(Type)typetype {@code elementType}. @return a serializable parameterized type.
Returns a type modelling a javax.inject.Provider that provides elements ofClass Types, ParameterizedType listOf(Type)typetype {@codecode elementType}. @return a serializable parameterized type.
Returns a type modelling a List whose elements are ofClass Types, ParameterizedType mapOf(Type, Type)typetype {@code elementType}. @return a serializable parameterized type.
Returns a type modelling a Map whose keys are ofClass Types, ParameterizedType newParameterizedType(Type, Type[])typetype {@code keyType} and whosevaluesvalues are of type {@code valueType}. @return a serializable parameterized type.
Returns a new parameterized type, applying {@code typeArguments}Class Types, ParameterizedType newParameterizedTypeWithOwner(Type, Type, Type[])toto {@code rawType}.TheThe returned type does not have an owner type. @return a serializable parameterized type.
Returns a new parameterized type, applying {@code typeArguments}Class Types, ParameterizedType providerOf(Type)toto {@code rawType}andand enclosed by {@code ownerType}. @return a serializable parameterized type.
Returns a type modelling a Provider that provides elements ofClass Types, ParameterizedType setOf(Type)typetype {@code elementType}. @return a serializable parameterized type.
Returns a type modelling a Set whose elements are ofClass Types, WildcardType subtypeOf(Type)typetype {@code elementType}. @return a serializable parameterized type.
Returns a type that represents an unknown type that extends {@code bound}.Class Types, WildcardType supertypeOf(Type)For example,ifif {@code bound} is {@code CharSequence.class}, thisreturnsreturns {@code ? extends CharSequence}.IfIf {@code bound} is {@code Object.class},this returns {@code ?}, which is shorthand for {@code ? extends Object}.
Returns a type that represents an unknown supertype of {@code bound}.ForFor example, if {@codecode bound} is {@code String.class}, this returns {@code ?super String}.