Package gw.lang.gosuc.simple
Class GosuCompiler
java.lang.Object
gw.lang.gosuc.simple.GosuCompiler
- All Implemented Interfaces:
IGosuCompiler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Fileprotected GosuInitializationprivate static final String[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddToSources(Path sourcePath, List<String> sourceFiles) private Stringbooleancompile(CommandLineOptions options, ICompilerDriver driver) booleancompile(File sourceFile, ICompilerDriver driver) private booleancompileGosuSources(CommandLineOptions options, ICompilerDriver driver, List<String> gosuFiles) private booleancompileJavaSources(CommandLineOptions options, ICompilerDriver driver, List<String> javaFiles) voidprivate static IFileSystemprivate voidcreateGosuOutputFiles(IGosuClass gsClass, ICompilerDriver driver) private voidcreateJavaOutputFiles(Collection<manifold.internal.javac.InMemoryClassJavaFileObject> compiledJavaFiles, ICompilerDriver driver) private booleancreateNewFile(File file) getSourceFiles(CommandLineOptions options) static Stringprivate ITypelonginitializeGosu(List<String> sourceFolders, List<String> classpath, List<String> backingSourcePath, String outputPath) private booleanisCompilable(IType type) booleanisPathIgnored(String sourceFile) private booleanisSourceFile(String absolutePathName) makeJavacOptions(CommandLineOptions options) private voidmaybeCopySourceFile(File parent, IGosuClass gsClass, File sourceFile, ICompilerDriver driver) private booleanprivate booleanprivate voidpopulateGosuClassFile(File outputFile, IGosuClass gosuClass, ICompilerDriver driver) private voidpopulateJavaClassFile(File outputFile, byte[] bytes, ICompilerDriver driver) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface gw.lang.gosuc.simple.IGosuCompiler
initializeGosu, unitializeGosu
-
Field Details
-
SOURCE_EXTS
-
_gosuInitialization
-
_compilingSourceFile
-
-
Constructor Details
-
GosuCompiler
public GosuCompiler()
-
-
Method Details
-
compile
- Specified by:
compilein interfaceIGosuCompiler
-
getSourceFiles
-
addToSources
-
isSourceFile
-
compileGosuSources
private boolean compileGosuSources(CommandLineOptions options, ICompilerDriver driver, List<String> gosuFiles) -
compileJavaSources
private boolean compileJavaSources(CommandLineOptions options, ICompilerDriver driver, List<String> javaFiles) -
makeJavacOptions
-
compile
- Specified by:
compilein interfaceIGosuCompiler
-
getType
-
isCompilable
-
createGosuOutputFiles
-
createJavaOutputFiles
private void createJavaOutputFiles(Collection<manifold.internal.javac.InMemoryClassJavaFileObject> compiledJavaFiles, ICompilerDriver driver) -
getStackTrace
-
combine
-
mkDir
-
mkdirs
-
createNewFile
- Throws:
IOException
-
maybeCopySourceFile
private void maybeCopySourceFile(File parent, IGosuClass gsClass, File sourceFile, ICompilerDriver driver) -
copyFile
- Throws:
IOException
-
populateGosuClassFile
private void populateGosuClassFile(File outputFile, IGosuClass gosuClass, ICompilerDriver driver) throws IOException - Throws:
IOException
-
populateJavaClassFile
private void populateJavaClassFile(File outputFile, byte[] bytes, ICompilerDriver driver) throws IOException - Throws:
IOException
-
initializeGosu
public long initializeGosu(List<String> sourceFolders, List<String> classpath, List<String> backingSourcePath, String outputPath) - Specified by:
initializeGosuin interfaceIGosuCompiler
-
createFileSystemInstance
-
uninitializeGosu
public void uninitializeGosu()- Specified by:
uninitializeGosuin interfaceIGosuCompiler
-
isPathIgnored
- Specified by:
isPathIgnoredin interfaceIGosuCompiler
-