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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Compile all sources stored in the root source folder for the instance.boolean
compileGivenSource
(String javaSource) This stores the given source code into the java file, then compiles it.boolean
Compiles the java file.
-
Constructor Details
-
GeneratedSourceCompilerImpl
public GeneratedSourceCompilerImpl(org.slf4j.Logger log, String className, File javaSrcFolder, File classTargetFolder, String classpath, Charset javaFileCharset) - 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.
-
-
Method Details
-
compileAllSources
public boolean compileAllSources()Compile all sources stored in the root source folder for the instance.- Specified by:
compileAllSources
in interfaceGeneratedSourceCompiler
- Returns:
- true if the compilation was Ok (without errors)
-
compileOneSource
public boolean compileOneSource()Compiles the java file.- Specified by:
compileOneSource
in 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:
compileGivenSource
in interfaceGeneratedSourceCompiler
- Returns:
- true if the compilation was Ok (without errors)
- See Also:
-
org.wsutils.servergeneration.portimpl.compiler.GeneratedSourceCompiler#compile(java.lang.String)
-