History log of /external/guice/core/src/com/google/inject/spi/RequireExactBindingAnnotationsOption.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2bb4771a1835b8a145c857b63bb41ae56e5e6767 18-Sep-2013 Christian Edward Gruber <cgruber@google.com> Exposes ElementSource at getSource() methods.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=50645247
/external/guice/core/src/com/google/inject/spi/RequireExactBindingAnnotationsOption.java
605bd086d3ecc4290ddfa4cf89fd840d22d1894c 09-Aug-2013 Christian Edward Gruber <cgruber@google.com> Updates the internals of an Element's source to keep track of the Modules that installed it, as well as the complete stack trace leading to the binding. The data is not yet exposed in Element.getSource(), but will be exposed in a future CL.

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
/external/guice/core/src/com/google/inject/spi/RequireExactBindingAnnotationsOption.java
e39158525475eca7971966c667494d240be7e242 16-May-2013 Christian Edward Gruber <cgruber@google.com> Change Key so that it upgrades Annotation classes where all methods have default values into an instance of the Annotation with the defaults as values, so that:
@Retention(RUNTIME)
@BindingAnnotation @interface AllDefaults {
int hasDefault() default 1;
}

@AllDefaults class Foo {}

void testKey() {
assertEquals(Key.get(Foo.class, Foo.class.getAnnotation(AllDefaults.class)),
Key.get(Foo.class, AllDefaults.class));
}

Also adds an option to "require exact binding annotations", which disables the error-prone fallback built into Guice whereby a binding for @Named Foo can substitute for @Named("foo") Foo if the latter doesn't exist but the former does.

-----------------
Manually Synced.
COMMIT=45600016
/external/guice/core/src/com/google/inject/spi/RequireExactBindingAnnotationsOption.java