File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
simple-component/src/main/java/io/jbock/simple Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 1111 * implementation is to be generated. The generated class will
1212 * have the name of the type annotated, appended with {@code _Impl}. For
1313 * example, {@code @Component interface MyComponent {...}} will produce an implementation named
14- * {@code MyComponent_Impl}.</p>
14+ * {@code MyComponent_Impl}.
1515 *
1616 * <h2>Component methods</h2>
1717 *
1818 * <p>Every type annotated with {@code @Component} must contain at least one abstract component
1919 * method. Component methods may have any name, but must have no parameters and return a bound type.
20- * A bound type is one of the following:</p>
20+ * A bound type is one of the following:
2121 *
2222 * <ul>
2323 * <li>an {@link Inject injected} type
3030@ Retention (SOURCE )
3131public @interface Component {
3232
33+ /**
34+ * A list of classes annotated with {@link Module} whose bindings are used to generate the
35+ * component implementation.
36+ */
37+ Class <?>[] modules () default {};
38+
3339 /**
3440 * A factory for a component. Components <em>may</em> have a single nested {@code interface}
3541 * annotated with {@code @Component.Factory}.
Original file line number Diff line number Diff line change 1+ package io .jbock .simple ;
2+
3+ import java .lang .annotation .ElementType ;
4+ import java .lang .annotation .Retention ;
5+ import java .lang .annotation .RetentionPolicy ;
6+ import java .lang .annotation .Target ;
7+
8+ /** Annotates a class that contributes to the object graph. */
9+ @ Retention (RetentionPolicy .RUNTIME )
10+ @ Target (ElementType .TYPE )
11+ public @interface Module {
12+ }
You can’t perform that action at this time.
0 commit comments