public class EclipseJdtCompilerStrategy extends CompilerStrategy
CompilerStrategy.SourceCodeGenerationExceptionpathToWriteClassFiles, pathToWriteSourceFiles, WRITE_RELATIVE_TO_CLASSPATH, writeClassFiles, writeSourceFiles| Constructor and Description |
|---|
EclipseJdtCompilerStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
assureTypeIsAccessible(Class<?> type)
Verify that the Class provided is accessible to the compiler/generator.
|
Class<?> |
compileClass(SourceCodeContext sourceCode)
Compile and return the (generated) class; this will also cause the
generated class to be detached from the class-pool, and any (optional)
source and/or class files to be written.
|
protected void |
writeClassFile(String packageName,
String simpleClassName,
byte[] data) |
protected void |
writeSourceFile(String sourceText,
String packageName,
String className)
Produces the requested source and/or class files for debugging purposes.
|
preparePackageOutputPathprotected void writeSourceFile(String sourceText, String packageName, String className) throws IOException
IOExceptionprotected void writeClassFile(String packageName, String simpleClassName, byte[] data) throws IOException
IOExceptionpublic void assureTypeIsAccessible(Class<?> type) throws CompilerStrategy.SourceCodeGenerationException
CompilerStrategyassureTypeIsAccessible in class CompilerStrategyCompilerStrategy.SourceCodeGenerationException - if the type is not accessiblepublic Class<?> compileClass(SourceCodeContext sourceCode) throws CompilerStrategy.SourceCodeGenerationException
compileClass in class CompilerStrategyIOExceptionCompilerStrategy.SourceCodeGenerationExceptionCopyright © 2016 Glasnost. All rights reserved.