From 6f4517f4a921cb958502e1dfa9331adb3044055e Mon Sep 17 00:00:00 2001 From: jbock Date: Sun, 24 Dec 2023 19:54:18 +0100 Subject: [PATCH] update javadoc of inject and provides --- .../src/main/java/io/jbock/simple/Inject.java | 13 ++++++++++++- .../src/main/java/io/jbock/simple/Provides.java | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/simple-component/src/main/java/io/jbock/simple/Inject.java b/simple-component/src/main/java/io/jbock/simple/Inject.java index cba7b11..48d255c 100644 --- a/simple-component/src/main/java/io/jbock/simple/Inject.java +++ b/simple-component/src/main/java/io/jbock/simple/Inject.java @@ -8,7 +8,18 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; /** - * Identifies injectable constructors and static methods. + * Identifies injectable constructors and {@code static} methods. + * An {@code @Inject}-annotated static method is allowed in the following places: + * + * */ @Target({METHOD, CONSTRUCTOR}) @Retention(RUNTIME) diff --git a/simple-component/src/main/java/io/jbock/simple/Provides.java b/simple-component/src/main/java/io/jbock/simple/Provides.java index 936a3e3..bf6a3fc 100644 --- a/simple-component/src/main/java/io/jbock/simple/Provides.java +++ b/simple-component/src/main/java/io/jbock/simple/Provides.java @@ -7,8 +7,8 @@ import static java.lang.annotation.RetentionPolicy.SOURCE; /** - * This is an alternative to the {@code @Inject} annotation - * which can only be used on static methods directly in the component. + * An alternative to the {@code @Inject} annotation that can be used + * on static methods which are direct children of the component interface. */ @Target(METHOD) @Retention(SOURCE)