diff --git a/pom.xml b/pom.xml index 6e5b257e..75eabedb 100644 --- a/pom.xml +++ b/pom.xml @@ -140,7 +140,10 @@ --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED @@ -253,11 +256,11 @@ --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED - --add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED - --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED diff --git a/src/main/java/com/google/testing/compile/CompileTester.java b/src/main/java/com/google/testing/compile/CompileTester.java index 6c74a97a..630247c6 100644 --- a/src/main/java/com/google/testing/compile/CompileTester.java +++ b/src/main/java/com/google/testing/compile/CompileTester.java @@ -17,9 +17,7 @@ import com.google.common.io.ByteSource; import com.google.errorprone.annotations.CanIgnoreReturnValue; - import java.nio.charset.Charset; - import javax.tools.Diagnostic; import javax.tools.JavaFileManager; import javax.tools.JavaFileObject; @@ -44,8 +42,7 @@ public interface CompileTester { SuccessfulCompilationClause compilesWithoutError(); /** - * The clause in the fluent API that tests for successful compilation without warnings or - * errors. + * The clause in the fluent API that tests for successful compilation without warnings or errors. */ @CanIgnoreReturnValue CleanCompilationClause compilesWithoutWarnings(); @@ -57,7 +54,7 @@ public interface CompileTester { /** * The clause in the fluent API that allows for chaining test conditions. * - * @param T the clause type returned by {@link #and()} + * @param the clause type returned by {@link #and()} */ public interface ChainingClause { T and(); @@ -66,12 +63,12 @@ public interface ChainingClause { /** * The clause in the fluent API that checks notes in a compilation. * - * @param T the non-generic clause type implementing this interface + * @param the non-generic clause type implementing this interface */ public interface CompilationWithNotesClause { /** - * Checks that a note exists that contains the given fragment in the - * {@linkplain Diagnostic#getMessage(java.util.Locale) diagnostic message}. + * Checks that a note exists that contains the given fragment in the {@linkplain + * Diagnostic#getMessage(java.util.Locale) diagnostic message}. */ @CanIgnoreReturnValue FileClause withNoteContaining(String messageFragment); @@ -87,13 +84,13 @@ public interface CompilationWithNotesClause { /** * The clause in the fluent API that checks notes and warnings in a compilation. * - * @param T the non-generic clause type implementing this interface + * @param the non-generic clause type implementing this interface */ public interface CompilationWithWarningsClause extends CompilationWithNotesClause { /** - * Checks that a warning exists that contains the given fragment in the - * {@linkplain Diagnostic#getMessage(java.util.Locale) diagnostic message}. + * Checks that a warning exists that contains the given fragment in the {@linkplain + * Diagnostic#getMessage(java.util.Locale) diagnostic message}. */ @CanIgnoreReturnValue FileClause withWarningContaining(String messageFragment); @@ -110,7 +107,7 @@ public interface CompilationWithWarningsClause extends CompilationWithNotesCl * The clause in the fluent API that checks that a diagnostic is associated with a particular * {@link JavaFileObject}. * - * @param T the clause type returned by {@link ChainingClause#and()} + * @param the clause type returned by {@link ChainingClause#and()} */ public interface FileClause extends ChainingClause { @CanIgnoreReturnValue @@ -118,10 +115,10 @@ public interface FileClause extends ChainingClause { } /** - * The clause in the fluent API that checks that a diagnostic is on a particular - * {@linkplain Diagnostic#getLineNumber() line}. + * The clause in the fluent API that checks that a diagnostic is on a particular {@linkplain + * Diagnostic#getLineNumber() line}. * - * @param T the clause type returned by {@link ChainingClause#and()} + * @param the clause type returned by {@link ChainingClause#and()} */ public interface LineClause extends ChainingClause { @CanIgnoreReturnValue @@ -129,10 +126,10 @@ public interface LineClause extends ChainingClause { } /** - * The clause in the fluent API that checks that a diagnostic starts at a particular - * {@linkplain Diagnostic#getColumnNumber() column}. + * The clause in the fluent API that checks that a diagnostic starts at a particular {@linkplain + * Diagnostic#getColumnNumber() column}. * - * @param T the clause type returned by {@link ChainingClause#and()} + * @param the clause type returned by {@link ChainingClause#and()} */ public interface ColumnClause extends ChainingClause { @CanIgnoreReturnValue @@ -142,12 +139,12 @@ public interface ColumnClause extends ChainingClause { /** * The clause in the fluent API that checks that files were generated. * - * @param T the non-generic clause type implementing this interface + * @param the non-generic clause type implementing this interface */ public interface GeneratedPredicateClause { /** - * Checks that a source file with an equivalent - * AST was generated for each of + * Checks that a source file with an equivalent AST was generated for each of * the given {@linkplain JavaFileObject files}. */ @CanIgnoreReturnValue @@ -160,9 +157,7 @@ public interface GeneratedPredicateClause { @CanIgnoreReturnValue T generatesFiles(JavaFileObject first, JavaFileObject... rest); - /** - * Checks that a file with the specified location, package, and filename was generated. - */ + /** Checks that a file with the specified location, package, and filename was generated. */ @CanIgnoreReturnValue SuccessfulFileClause generatesFileNamed( JavaFileManager.Location location, String packageName, String relativeName); @@ -171,12 +166,12 @@ SuccessfulFileClause generatesFileNamed( /** * The clause in the fluent API that checks that a generated file has the specified contents. * - * @param T the non-generic clause type implementing this interface + * @param the non-generic clause type implementing this interface */ public interface SuccessfulFileClause extends ChainingClause> { /** - * Checks that the contents of the generated file match the contents of the specified - * {@link ByteSource}. + * Checks that the contents of the generated file match the contents of the specified {@link + * ByteSource}. */ @CanIgnoreReturnValue SuccessfulFileClause withContents(ByteSource expectedByteSource); @@ -203,8 +198,8 @@ public interface CleanCompilationClause public interface UnsuccessfulCompilationClause extends CompilationWithWarningsClause { /** - * Checks that an error exists that contains the given fragment in the - * {@linkplain Diagnostic#getMessage(java.util.Locale) diagnostic message}. + * Checks that an error exists that contains the given fragment in the {@linkplain + * Diagnostic#getMessage(java.util.Locale) diagnostic message}. */ @CanIgnoreReturnValue FileClause withErrorContaining(String messageFragment);