Package gw.lang.gosuc.simple
Class GosuCompiler
java.lang.Object
gw.lang.gosuc.simple.GosuCompiler
- All Implemented Interfaces:
IGosuCompiler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected File
protected GosuInitialization
private static final String[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addToSources
(Path sourcePath, List<String> sourceFiles) private String
boolean
compile
(CommandLineOptions options, ICompilerDriver driver) boolean
compile
(File sourceFile, ICompilerDriver driver) private boolean
compileGosuSources
(CommandLineOptions options, ICompilerDriver driver, List<String> gosuFiles) private boolean
compileJavaSources
(CommandLineOptions options, ICompilerDriver driver, List<String> javaFiles) void
private static IFileSystem
private void
createGosuOutputFiles
(IGosuClass gsClass, ICompilerDriver driver) private void
createJavaOutputFiles
(Collection<manifold.internal.javac.InMemoryClassJavaFileObject> compiledJavaFiles, ICompilerDriver driver) private boolean
createNewFile
(File file) getSourceFiles
(CommandLineOptions options) static String
private IType
long
initializeGosu
(List<String> sourceFolders, List<String> classpath, List<String> backingSourcePath, String outputPath) private boolean
isCompilable
(IType type) boolean
isPathIgnored
(String sourceFile) private boolean
isSourceFile
(String absolutePathName) makeJavacOptions
(CommandLineOptions options) private void
maybeCopySourceFile
(File parent, IGosuClass gsClass, File sourceFile, ICompilerDriver driver) private boolean
private boolean
private void
populateGosuClassFile
(File outputFile, IGosuClass gosuClass, ICompilerDriver driver) private void
populateJavaClassFile
(File outputFile, byte[] bytes, ICompilerDriver driver) void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
compile
in 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:
compile
in 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:
initializeGosu
in interfaceIGosuCompiler
-
createFileSystemInstance
-
uninitializeGosu
public void uninitializeGosu()- Specified by:
uninitializeGosu
in interfaceIGosuCompiler
-
isPathIgnored
- Specified by:
isPathIgnored
in interfaceIGosuCompiler
-