Class AbstractCompilerTest
java.lang.Object
org.codehaus.plexus.compiler.AbstractCompilerTest
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intcompilerErrorCount(List<CompilerMessage> messages) protected intcompilerWarningCount(List<CompilerMessage> messages) protected voidconfigureCompilerConfig(CompilerConfiguration compilerConfig) protected StringdisplayLines(List<String> warnings) protected intprotected Collection<String> protected intprotected final Compilerprotected static FilegetJarPath(String className) 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.protected Stringprotected abstract Stringprotected voidsetCompilerDebug(boolean flag) protected voidsetCompilerDeprecationWarnings(boolean flag) voidsetForceJavacCompilerUse(boolean forceJavacCompilerUse) void
-
Constructor Details
-
AbstractCompilerTest
public AbstractCompilerTest()
-
-
Method Details
-
getRoleHint
-
setCompilerDebug
protected void setCompilerDebug(boolean flag) -
setCompilerDeprecationWarnings
protected void setCompilerDeprecationWarnings(boolean flag) -
setForceJavacCompilerUse
public void setForceJavacCompilerUse(boolean forceJavacCompilerUse) -
getCompiler
-
getClasspath
-
getJarPath
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
-
testCompilingSources
-
displayLines
-
getTargetVersion
-
getSourceVersion
-
compilerErrorCount
-
compilerWarningCount
-
expectedErrors
protected int expectedErrors() -
expectedWarnings
protected int expectedWarnings() -
expectedOutputFiles
-
getJavaVersion
-