Skip to content

Commit

Permalink
Move ComponentGenerator into processor/internal/root since it's the o…
Browse files Browse the repository at this point in the history
…nly usage.

RELNOTES=N/A
PiperOrigin-RevId: 356504954
  • Loading branch information
bcorso authored and Dagger Team committed Feb 9, 2021
1 parent 785838e commit 438bb1d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
3 changes: 0 additions & 3 deletions java/dagger/hilt/processor/internal/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,9 @@ java_library(
name = "component_descriptor",
srcs = [
"ComponentDescriptor.java",
"ComponentGenerator.java",
"ComponentTree.java",
],
deps = [
":classnames",
":processors",
"//java/dagger/internal/codegen/extension",
"//java/dagger/internal/guava:base",
"//java/dagger/internal/guava:collect",
Expand Down
1 change: 1 addition & 0 deletions java/dagger/hilt/processor/internal/root/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ java_plugin(
java_library(
name = "processor_lib",
srcs = [
"ComponentGenerator.java",
"RootFileFormatter.java",
"RootGenerator.java",
"RootProcessor.java",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package dagger.hilt.processor.internal;
package dagger.hilt.processor.internal.root;

import static dagger.internal.codegen.extension.DaggerStreams.toImmutableList;
import static java.util.Comparator.comparing;
Expand All @@ -28,6 +28,8 @@
import com.squareup.javapoet.JavaFile;
import com.squareup.javapoet.TypeName;
import com.squareup.javapoet.TypeSpec;
import dagger.hilt.processor.internal.ClassNames;
import dagger.hilt.processor.internal.Processors;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Comparator;
Expand All @@ -39,8 +41,7 @@
import javax.lang.model.element.TypeElement;

/** Generates a Dagger component or subcomponent interface. */
// TODO(bcorso): Make this non-public
public final class ComponentGenerator {
final class ComponentGenerator {
private static final Joiner JOINER = Joiner.on(".");
private static final Comparator<ClassName> SIMPLE_NAME_SORTER =
Comparator.comparing((ClassName c) -> JOINER.join(c.simpleNames()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import com.squareup.javapoet.TypeSpec;
import dagger.hilt.processor.internal.ClassNames;
import dagger.hilt.processor.internal.ComponentDescriptor;
import dagger.hilt.processor.internal.ComponentGenerator;
import dagger.hilt.processor.internal.ComponentNames;
import dagger.hilt.processor.internal.ComponentTree;
import dagger.hilt.processor.internal.Processors;
Expand Down

0 comments on commit 438bb1d

Please sign in to comment.