Skip to content

Commit

Permalink
Change javadoc <tt> <code>
Browse files Browse the repository at this point in the history
Noting that <tt> is not valid in html5 and the suggestion is to change it to <code>
  • Loading branch information
rbygrave committed Sep 27, 2021
1 parent 749c66a commit f32375c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions src/main/java/jakarta/inject/Inject.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,24 @@
* zero or more dependencies as arguments. {@code @Inject} can apply to at most
* one constructor per class.
*
* <blockquote><tt>@Inject
* <blockquote><code>@Inject
* <i>ConstructorModifiers<sub>opt</sub></i>
* <i>SimpleTypeName</i>(<i>FormalParameterList<sub>opt</sub></i>)
* <i>Throws<sub>opt</sub></i>
* <i>ConstructorBody</i></tt>
* <i>ConstructorBody</i></code>
* </blockquote>
*
* <p>{@code @Inject} is optional for public, no-argument constructors when no
* other constructors are present. This enables injectors to invoke default
* constructors.
*
* <blockquote><tt>
* <blockquote><code>
* {@literal @}Inject<sub><i>opt</i></sub>
* <i>Annotations<sub>opt</sub></i>
* public
* <i>SimpleTypeName</i>()
* <i>Throws<sub>opt</sub></i>
* <i>ConstructorBody</i></tt>
* <i>ConstructorBody</i></code>
* </blockquote>
* <p>Injectable fields:
Expand All @@ -62,10 +62,10 @@
* <li>are not final.
* <li>may have any otherwise valid name.</li></ul>
*
* <blockquote><tt>@Inject
* <blockquote><code>@Inject
* <i>FieldModifiers<sub>opt</sub></i>
* <i>Type</i>
* <i>VariableDeclarators</i>;</tt>
* <i>VariableDeclarators</i>;</code>
* </blockquote>
*
* <p>Injectable methods:
Expand All @@ -77,12 +77,12 @@
* <li>may have any otherwise valid name.</li>
* <li>accept zero or more dependencies as arguments.</li></ul>
*
* <blockquote><tt>@Inject
* <blockquote><code>@Inject
* <i>MethodModifiers<sub>opt</sub></i>
* <i>ResultType</i>
* <i>Identifier</i>(<i>FormalParameterList<sub>opt</sub></i>)
* <i>Throws<sub>opt</sub></i>
* <i>MethodBody</i></tt>
* <i>MethodBody</i></code>
* </blockquote>
*
* <p>The injector ignores the result of an injected method, but
Expand Down Expand Up @@ -111,7 +111,7 @@
*
* <p>Injection of members annotated with {@code @Inject} is required. While an
* injectable member may use any accessibility modifier (including
* <tt>private</tt>), platform or injector limitations (like security
* <code>private</code>), platform or injector limitations (like security
* restrictions or lack of reflection support) might preclude injection
* of non-public members.
*
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/jakarta/inject/package-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* locators (e.g., JNDI).&nbsp;This process, known as <i>dependency
* injection</i>, is beneficial to most nontrivial applications.
*
* <p>Many types depend on other types. For example, a <tt>Stopwatch</tt> might
* depend on a <tt>TimeSource</tt>. The types on which a type depends are
* <p>Many types depend on other types. For example, a <code>Stopwatch</code> might
* depend on a <code>TimeSource</code>. The types on which a type depends are
* known as its <i>dependencies</i>. The process of finding an instance of a
* dependency to use at run time is known as <i>resolving</i> the dependency.
* If no such instance can be found, the dependency is said to be
Expand Down Expand Up @@ -100,7 +100,7 @@
*
* <p>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 <tt>StopwatchWidget</tt> instance:
* asked an injector to create a <code>StopwatchWidget</code> instance:
*
* <pre> /** GUI for a Stopwatch &#42;/
* class StopwatchWidget {
Expand All @@ -110,9 +110,9 @@
*
* <p>The injector might:
* <ol>
* <li>Find a <tt>TimeSource</tt>
* <li>Construct a <tt>Stopwatch</tt> with the <tt>TimeSource</tt>
* <li>Construct a <tt>StopwatchWidget</tt> with the <tt>Stopwatch</tt>
* <li>Find a <code>TimeSource</code>
* <li>Construct a <code>Stopwatch</code> with the <code>TimeSource</code>
* <li>Construct a <code>StopwatchWidget</code> with the <code>Stopwatch</code>
* </ol>
*
* <p>This leaves the programmer's code clean, flexible, and relatively free
Expand Down

0 comments on commit f32375c

Please sign in to comment.