square/dagger — pull request #291 by adriancole (2013-07-13 21:25:33+00:00)
Title: add Provides.Type.SET_VALUES

fixes issue #261. `Provides.Type.SET_VALUES` allows default or additional contributions to Set bindings. Particularly, it allows you to specify an empty set binding without requiring downstream modules declare `Module.overrides=true`

[Example](https://github.com/adriancole/dagger/blob/provides-setvalues/compiler/src/it/extension-graph-setvalues/src/main/java/test/TestApp.java)
```java

class TestApp implements Runnable {
@Inject Set strings;

@Override public void run() {
System.out.println(strings);
}

public static void main(String[] args) {
ObjectGraph root = ObjectGraph.create(new RootModule());
ObjectGraph extension = root.plus(new ExtensionModule());
extension.get(TestApp.class).run();
}

@Module(injects = TestApp.class)
static class RootModule {
@Provides(type = SET_VALUES) Set defaultToEmpty(){
return new HashSet();
}
}

@Module(addsTo=RootModule.class, injects = TestApp.class)
static class ExtensionModule {
@Provides(type = SET) String addToSet(){
return "contributed";
}
}
}
```