From a213ce33a180cea4ca54a8e8cc87c61447f0f592 Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Thu, 22 Jul 2021 22:29:18 -0700 Subject: [PATCH] Make javadoc valid html5 As of [JDK-8247957](https://bugs.openjdk.java.net/browse/JDK-8247957), doclint no longer supports html4. RELNOTES=n/a PiperOrigin-RevId: 386389553 --- java/dagger/Component.java | 40 +++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/java/dagger/Component.java b/java/dagger/Component.java index 5bc1781d389..be746e81560 100644 --- a/java/dagger/Component.java +++ b/java/dagger/Component.java @@ -35,14 +35,16 @@ * example, {@code @Component interface MyComponent {...}} will produce an implementation named * {@code DaggerMyComponent}. * - * + *

+ * *

Component methods

* *

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. * - * + *

+ * *

Provision methods

* *

Provision methods have no parameters and return an {@link Inject injected} or {@link Provides @@ -69,6 +71,7 @@ * * * + * *

Members-injection methods

* *

Members-injection methods have a single parameter and inject dependencies into each of the @@ -112,6 +115,7 @@ * * * + * *

Instantiation

* *

Component implementations are primarily instantiated via a generated Example of using a builder: * *

{@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();
+ * }
  * }
* *

Example of using a factory: @@ -162,7 +166,8 @@ * SomeComponent.create()} and {@code SomeComponent.builder().build()} are both valid and * equivalent. * - * + *

+ * *

Scope

* *

Each Dagger component can be associated with a scope by annotating it with the {@linkplain @@ -184,14 +189,16 @@ * self-contained implementations, exiting a scope is as simple as dropping all references to the * component instance. * - * + *

+ * *

Component relationships

* *

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. * - * + *

+ * *

Subcomponents

* *

The simplest way to relate two components is by declaring a {@link Subcomponent}. A @@ -220,6 +227,7 @@ * * * + * *

Component dependencies

* *

While subcomponents are the simplest way to compose subgraphs of bindings, subcomponents are