Skip to content

Commit

Permalink
Clean-up: Remove unused methods and references to JavaFileObject.
Browse files Browse the repository at this point in the history
These are no longer used due to the migration to XProcessing testing API.

RELNOTES=N/A
PiperOrigin-RevId: 507785408
  • Loading branch information
bcorso authored and Dagger Team committed Feb 7, 2023
1 parent fae46c7 commit 027b02c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
8 changes: 0 additions & 8 deletions javatests/dagger/internal/codegen/CompilerMode.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,4 @@ public ImmutableMap<String, String> processorOptions() {
public FluentIterable<String> javacopts() {
return FluentIterable.from(javacopts);
}

/**
* Returns a {@link JavaFileBuilder} that builds {@link javax.tools.JavaFileObject}s for this
* mode.
*/
public JavaFileBuilder javaFileBuilder(String qualifiedName) {
return new JavaFileBuilder(this, qualifiedName);
}
}
9 changes: 1 addition & 8 deletions javatests/dagger/internal/codegen/JavaFileBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@

import androidx.room.compiler.processing.util.Source;
import com.google.common.collect.ImmutableList;
import com.google.testing.compile.JavaFileObjects;
import dagger.testing.compile.CompilerTests;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import javax.tools.JavaFileObject;

/**
* A fluent API to build a {@link JavaFileObject} appropriate for a current set of settings, such as
* A fluent API to build a {@link Source} appropriate for a current set of settings, such as
* compiler mode.
*
* <p>After creating a builder, you can add lines to the file. Call {@link #addLines(String...)} to
Expand Down Expand Up @@ -89,11 +87,6 @@ JavaFileBuilder addLinesIf(Object setting, String... lines) {
return this;
}

/** Builds the {@link JavaFileObject}. */
JavaFileObject build() {
return JavaFileObjects.forSourceLines(qualifiedName, sourceLines.build());
}

/** Builds the {@link Source}. */
Source buildSource() {
return CompilerTests.javaSource(qualifiedName, sourceLines.build().toArray(new String[] {}));
Expand Down

0 comments on commit 027b02c

Please sign in to comment.