diff --git a/src/main/java/jakarta/inject/Inject.java b/src/main/java/jakarta/inject/Inject.java index e7dd028..0ea97a2 100644 --- a/src/main/java/jakarta/inject/Inject.java +++ b/src/main/java/jakarta/inject/Inject.java @@ -36,24 +36,24 @@ * zero or more dependencies as arguments. {@code @Inject} can apply to at most * one constructor per class. * - *
@Inject + ** *+ * ConstructorBody *@Inject * ConstructorModifiersopt * SimpleTypeName(FormalParameterListopt) * Throwsopt - * ConstructorBody
{@code @Inject} is optional for public, no-argument constructors when no * other constructors are present. This enables injectors to invoke default * constructors. * - *
+ **+ * ConstructorBody ** {@literal @}Injectopt * Annotationsopt * public * SimpleTypeName() * Throwsopt - * ConstructorBody
Injectable fields: @@ -62,10 +62,10 @@ *
@Inject + ** *+ * VariableDeclarators; *@Inject * FieldModifiersopt * Type - * VariableDeclarators;
Injectable methods: @@ -77,12 +77,12 @@ *
@Inject + ** *+ * MethodBody *@Inject * MethodModifiersopt * ResultType * Identifier(FormalParameterListopt) * Throwsopt - * MethodBody
The injector ignores the result of an injected method, but @@ -111,7 +111,7 @@ * *
Injection of members annotated with {@code @Inject} is required. While an
* injectable member may use any accessibility modifier (including
- * private), platform or injector limitations (like security
+ * private
), platform or injector limitations (like security
* restrictions or lack of reflection support) might preclude injection
* of non-public members.
*
diff --git a/src/main/java/jakarta/inject/package-info.java b/src/main/java/jakarta/inject/package-info.java
index 1f7abe2..01f500d 100644
--- a/src/main/java/jakarta/inject/package-info.java
+++ b/src/main/java/jakarta/inject/package-info.java
@@ -21,8 +21,8 @@
* locators (e.g., JNDI). This process, known as dependency
* injection, is beneficial to most nontrivial applications.
*
- *
Many types depend on other types. For example, a Stopwatch might - * depend on a TimeSource. The types on which a type depends are + *
Many types depend on other types. For example, a Stopwatch
might
+ * depend on a TimeSource
. The types on which a type depends are
* known as its dependencies. The process of finding an instance of a
* dependency to use at run time is known as resolving the dependency.
* If no such instance can be found, the dependency is said to be
@@ -100,7 +100,7 @@
*
*
The injector further passes dependencies to other dependencies until it
* constructs the entire object graph. For example, suppose the programmer
- * asked an injector to create a StopwatchWidget instance:
+ * asked an injector to create a StopwatchWidget
instance:
*
*
/** GUI for a Stopwatch */ * class StopwatchWidget { @@ -110,9 +110,9 @@ * *The injector might: *
- *
* *- Find a TimeSource - *
- Construct a Stopwatch with the TimeSource - *
- Construct a StopwatchWidget with the Stopwatch + *
- Find a
TimeSource
+ *- Construct a
Stopwatch
with theTimeSource
+ *- Construct a
StopwatchWidget
with theStopwatch
*This leaves the programmer's code clean, flexible, and relatively free