Skip to content

Commit

Permalink
Make javadoc valid html5
Browse files Browse the repository at this point in the history
As of [JDK-8247957](https://bugs.openjdk.java.net/browse/JDK-8247957), doclint no longer supports html4.

RELNOTES=n/a
PiperOrigin-RevId: 386389553
  • Loading branch information
cushon authored and Dagger Team committed Jul 23, 2021
1 parent 4260832 commit a213ce3
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions java/dagger/Component.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@
* example, {@code @Component interface MyComponent {...}} will produce an implementation named
* {@code DaggerMyComponent}.
*
* <a id="component-methods"></a>
* <p><a id="component-methods"></a>
*
* <h2>Component methods</h2>
*
* <p>Every type annotated with {@code @Component} must contain at least one abstract component
* method. Component methods may have any name, but must have signatures that conform to either
* {@linkplain Provider provision} or {@linkplain MembersInjector members-injection} contracts.
*
* <a id="provision-methods"></a>
* <p><a id="provision-methods"></a>
*
* <h3>Provision methods</h3>
*
* <p>Provision methods have no parameters and return an {@link Inject injected} or {@link Provides
Expand All @@ -69,6 +71,7 @@
* </code></pre>
*
* <a id="members-injection-methods"></a>
*
* <h3>Members-injection methods</h3>
*
* <p>Members-injection methods have a single parameter and inject dependencies into each of the
Expand Down Expand Up @@ -112,6 +115,7 @@
* </code></pre>
*
* <a id="instantiation"></a>
*
* <h2>Instantiation</h2>
*
* <p>Component implementations are primarily instantiated via a generated <a
Expand All @@ -131,17 +135,17 @@
* <p>Example of using a builder:
*
* <pre>{@code
* public static void main(String[] args) {
* OtherComponent otherComponent = ...;
* MyComponent component = DaggerMyComponent.builder()
* // required because component dependencies must be set
* .otherComponent(otherComponent)
* // required because FlagsModule has constructor parameters
* .flagsModule(new FlagsModule(args))
* // may be elided because a no-args constructor is visible
* .myApplicationModule(new MyApplicationModule())
* .build();
* }
* public static void main(String[] args) {
* OtherComponent otherComponent = ...;
* MyComponent component = DaggerMyComponent.builder()
* // required because component dependencies must be set
* .otherComponent(otherComponent)
* // required because FlagsModule has constructor parameters
* .flagsModule(new FlagsModule(args))
* // may be elided because a no-args constructor is visible
* .myApplicationModule(new MyApplicationModule())
* .build();
* }
* }</pre>
*
* <p>Example of using a factory:
Expand All @@ -162,7 +166,8 @@
* SomeComponent.create()} and {@code SomeComponent.builder().build()} are both valid and
* equivalent.
*
* <a id="scope"></a>
* <p><a id="scope"></a>
*
* <h2>Scope</h2>
*
* <p>Each Dagger component can be associated with a scope by annotating it with the {@linkplain
Expand All @@ -184,14 +189,16 @@
* self-contained implementations, exiting a scope is as simple as dropping all references to the
* component instance.
*
* <a id="component-relationships"></a>
* <p><a id="component-relationships"></a>
*
* <h2>Component relationships</h2>
*
* <p>While there is much utility in isolated components with purely unscoped bindings, many
* applications will call for multiple components with multiple scopes to interact. Dagger provides
* two mechanisms for relating components.
*
* <a id="subcomponents"></a>
* <p><a id="subcomponents"></a>
*
* <h3>Subcomponents</h3>
*
* <p>The simplest way to relate two components is by declaring a {@link Subcomponent}. A
Expand Down Expand Up @@ -220,6 +227,7 @@
* </code></pre>
*
* <a id="component-dependencies"></a>
*
* <h3>Component dependencies</h3>
*
* <p>While subcomponents are the simplest way to compose subgraphs of bindings, subcomponents are
Expand Down

0 comments on commit a213ce3

Please sign in to comment.