File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
simple-component/src/main/java/io/jbock/simple Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 88import static java .lang .annotation .RetentionPolicy .RUNTIME ;
99
1010/**
11- * Identifies injectable constructors and <em>static</em> methods.
11+ * Identifies injectable constructors and {@code static} methods.
12+ * An {@code @Inject}-annotated static method is allowed in the following places:
13+ *
14+ * <ul>
15+ * <li>The method can be a direct child of the class or interface
16+ * that defines its return type.
17+ * <li>If the class or interface that defines its return type is nested
18+ * inside an enclosing class, then the method may also be a direct child of the
19+ * enclosing class.
20+ * <li>The method can be a direct child of the component interface.
21+ * Alternatively, the {@link Provides} annotation can be used in that case.
22+ * </ul>
1223 */
1324@ Target ({METHOD , CONSTRUCTOR })
1425@ Retention (RUNTIME )
Original file line number Diff line number Diff line change 77import static java .lang .annotation .RetentionPolicy .SOURCE ;
88
99/**
10- * This is an alternative to the {@code @Inject} annotation
11- * which can only be used on static methods directly in the component.
10+ * An alternative to the {@code @Inject} annotation that can be used
11+ * on static methods which are direct children of the component interface .
1212 */
1313@ Target (METHOD )
1414@ Retention (SOURCE )
You can’t perform that action at this time.
0 commit comments