For constant field declarations, you should use the immutable type (such as ImmutableList) instead of the general collection interface type (such as List). This communicates to your callers important semantic guarantees.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=149317176
configure a presubmit to ensure that it stays formatted.
Highlights include:
* simplified import order
* method annotations are now consistently defined on the preceding line
* javadoc reformatted to 100 chars column width
One test that contained line numbers in error messages had to be modified and
the formatter didn't like some of the more complicated preprocessor directives
(MOE and AOP).
To avoid formatting the copyright notices as javadoc i did a preprocessing step to rewrite the initial '/**' to '/*' using perl
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132718493
Now that the multibindings package is part of the main guice project we can do things like
* install the MultibindingsScanner by default
* rewrite multibinders to use InternalFactory objcts
But for those to work they need to be in the internal package.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130127811
*** Reason for rollback ***
breaks stuff that should be using the binding SPI
*** Original change description ***
Move the implementation classes from the multibindings package to inject/internal.
Now that the multibindings package is part of the main guice project we can do things like
* install the MultibindingsScanner by default
* rewrite multibinders to use InternalFactory objcts
But for those to work they need to be in the internal package.
***
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130114909
Now that the multibindings package is part of the main guice project we can do things like
* install the MultibindingsScanner by default
* rewrite multibinders to use InternalFactory objcts
But for those to work they need to be in the internal package.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130106966
This deletes the maven artifact 'com.google.inject.extensions:guice-multibindings' and moves all
classes/tests into 'com.google.inject:guice'.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=129637237
bindings and have those methods bound as Providers to specialized Keys.
This is the basis of what will be used to allow
Multibinder/MapBinder/OptionalBinder to have stuff like @SetProvides,
@MapProvides, @OptionalProvides and dagger interop support.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=85361820
Instead of relying on Guice binding deduplication (and hacking up RealElement
to break the annotation contract to do so, causing weirdness in WeakKeySet &
forcing us to care about "rehashing keys"), we instead deduplicate within
Multibinder. The downside of this is that toInstance or toProvider(instance)
bindings that are deduplicated will remain in the object graph but effectively
be unreachable. However, that's a downside I'm willing to live with to remove
this hack.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=72570932
only if there's >1 module (otherwise it's just noise). The format is
Some normal messaging about the fact that something terrible happened
at <the normal source> (via modules: A -> B -> C)
So, for example, exposing something that isn't bound would show up as:
1) Could not expose() Foo, it must be explicitly bound.
at FooExposerModule.configure(FooExposerModule.java:211) (via modules: ParentModule -> FooExposerModule)
.. and a duplicate binding would show up as:
A binding to DuplicatedThing was already configured at ModuleA.configure(ModuleA.java:36) (via modules: ParentModule -> FooModule -> ModuleA)
at ModuleA.configure(ModuleA.java:36) (via modules: ParentModule -> BarModule -> ModuleA)
All the tests passed as-is (because this is just new information), so I made a bunch of tests stricter to explicitly look for this new information.
I also cleaned up some other errors regarding scopes & some other stuff.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=53039251
This CL includes a noteworthy adaptation of an earlier attempt which caused timeouts in some client tests, forcing a rollback ([]). Because Key caches its hashCode, we were inadvertently inserting every binding for a given multibound set into the same hashmap bucket, causing at best O(n^2) behaviour (and possibly worse, depending on how HashMap is implemented). To fix this, this CL adds changes to core Guice to recompute the Key's hashCode at injector construction time. (In fact, at the end of every Elements.getElements call, so any SPI-based code gets the same benefits.)
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=51233981
Technical details:
1) The call stack data is only available for elements created by the binder (excepting Message objects). So, elements that are created at injection time (e.g, JIT bindings, Stage, Injector, Logger, etc.) will not contain these data.
For elements affected, ElementSource.getDeclaringSource() should return what is returned by getSource() currently.
2) In the case of binding builder, similar to the current implementation, ElementSource provides the call stack of builder creation not 'element addition to the binder's elements.'
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=50247441
* Sort imports
* Convert tabs to spaces
* Fix the ant no_aop build
Revision created by MOE tool push_codebase.
MOE_MIGRATION=2532
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1572 d779f126-a31b-0410-b53b-1d3aecad763e