Class GeneratedSourceCompilerImpl
java.lang.Object
com.graphql_java_generator.plugin.test.compiler.GeneratedSourceCompilerImpl
- All Implemented Interfaces:
GeneratedSourceCompiler
This class allows to compile a given source code.
- Author:
- etienne-sf
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompile all sources stored in the root source folder for the instance.booleancompileGivenSource(String javaSource) This stores the given source code into the java file, then compiles it.booleanCompiles the java file.
-
Constructor Details
-
GeneratedSourceCompilerImpl
public GeneratedSourceCompilerImpl(org.slf4j.Logger log, String className, File javaSrcFolder, File classTargetFolder, String classpath, Charset javaFileCharset, String javaVersion, String javaRelease) - Parameters:
log-className- The full classname, that is: with the package (e.g.: java.io.File)javaSrcFolder-classTargetFolder-classpath- If null, the current classpath is used.javaFileCharset- TheCharset(like UTF-8...) to use to store the java source file.javaRelease-javaVersion-
-
-
Method Details
-
compileAllSources
public boolean compileAllSources()Compile all sources stored in the root source folder for the instance.- Specified by:
compileAllSourcesin interfaceGeneratedSourceCompiler- Returns:
- true if the compilation was Ok (without errors)
-
compileOneSource
public boolean compileOneSource()Compiles the java file.- Specified by:
compileOneSourcein interfaceGeneratedSourceCompiler- Returns:
- true if the compilation was Ok (without errors)
-
compileGivenSource
This stores the given source code into the java file, then compiles it. The source file comes from the instance parameters.- Specified by:
compileGivenSourcein interfaceGeneratedSourceCompiler- Returns:
- true if the compilation was Ok (without errors)
- See Also:
-
org.wsutils.servergeneration.portimpl.compiler.GeneratedSourceCompiler#compile(java.lang.String)
-