Class AbstractCompilerTest

java.lang.Object
org.codehaus.plexus.compiler.AbstractCompilerTest

public abstract class AbstractCompilerTest extends Object
  • Constructor Details

    • AbstractCompilerTest

      public AbstractCompilerTest()
  • Method Details

    • getRoleHint

      protected abstract String getRoleHint()
    • setCompilerDebug

      protected void setCompilerDebug(boolean flag)
    • setCompilerDeprecationWarnings

      protected void setCompilerDeprecationWarnings(boolean flag)
    • setForceJavacCompilerUse

      public void setForceJavacCompilerUse(boolean forceJavacCompilerUse)
    • getCompiler

      protected final Compiler getCompiler()
    • getClasspath

      protected List<String> getClasspath() throws Exception
      Throws:
      Exception
    • getJarPath

      protected static File getJarPath(String className) throws Exception
      Locates the jar a class was loaded from, so that a test can put a dependency of its own on the classpath it asks the compiler to use. The dependency is declared in the pom like any other, and found here through the class loader rather than by guessing at a path inside the local repository.
      Parameters:
      className - fully qualified name of a class in the wanted jar
      Returns:
      the jar holding that class
      Throws:
      Exception
    • configureCompilerConfig

      protected void configureCompilerConfig(CompilerConfiguration compilerConfig)
    • testCompilingSources

      @Test public void testCompilingSources() throws Exception
      Throws:
      Exception
    • displayLines

      protected String displayLines(List<String> warnings)
    • getTargetVersion

      public String getTargetVersion()
    • getSourceVersion

      public String getSourceVersion()
    • compilerErrorCount

      protected int compilerErrorCount(List<CompilerMessage> messages)
    • compilerWarningCount

      protected int compilerWarningCount(List<CompilerMessage> messages)
    • expectedErrors

      protected int expectedErrors()
    • expectedWarnings

      protected int expectedWarnings()
    • expectedOutputFiles

      protected Collection<String> expectedOutputFiles()
    • getJavaVersion

      protected String getJavaVersion()