| Package | Description |
|---|---|
| org.jsweet.transpiler |
This package contains the JSweet Java to JavaScript transpiler
implementation.
|
| org.jsweet.transpiler.eval | |
| org.jsweet.transpiler.util |
This package contains utilities for the JSweet transpiler.
|
| Modifier and Type | Field and Description |
|---|---|
SourceFile[] |
JSweetContext.sourceFiles
The source files that are being transpiled.
|
| Modifier and Type | Method and Description |
|---|---|
static SourceFile[] |
SourceFile.getSourceFiles(File... dirs)
Gets all the Java source files found in the given dirs and their subdirs.
|
static SourceFile[] |
SourceFile.getSourceFiles(Iterable<File> dirs)
Gets all the Java source files found in the given dirs and their subdirs.
|
SourceFile |
JSweetTranspiler.getWatchedFile(File javaFile)
Gets the watched files that corresponds to the given Java file.
|
SourceFile |
TypeScript2JavaScriptWithTscTranspiler.getWatchedFile(File javaFile) |
SourceFile[] |
JSweetTranspiler.getWatchedFiles()
Returns the watched files when the transpiler is in watch mode.
|
protected SourceFile |
SourceFile.setTsFile(File tsFile)
Internally used by
JSweetTranspiler. |
static SourceFile[] |
SourceFile.toSourceFiles(Collection<File> javaFiles)
Converts files to source files.
|
static SourceFile[] |
SourceFile.toSourceFiles(File[] javaFiles)
Converts files to source files.
|
static SourceFile[] |
SourceFile.toSourceFiles(String... javaFilePaths)
Converts file paths to source files.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<SourceFile> |
TypeScript2JavaScriptWithTscTranspiler.getWatchedFiles() |
| Modifier and Type | Method and Description |
|---|---|
EvaluationResult |
JSweetTranspiler.eval(String engineName,
TranspilationHandler transpilationHandler,
SourceFile... sourceFiles)
Evaluates the given source files with the given evaluation engine.
|
EvaluationResult |
JSweetTranspiler.eval(TranspilationHandler transpilationHandler,
SourceFile... sourceFiles)
Evaluates the given Java source files with the default JavaScript engine
(Nashorn).
|
static SourcePosition |
SourceFile.findOriginPosition(SourcePosition position,
SourceFile[] sourceFiles) |
void |
TranspilationHandler.onCompleted(JSweetTranspiler transpiler,
boolean fullPass,
SourceFile[] files)
This method is invoked when the tranpilation process ends.
|
static File[] |
SourceFile.toFiles(SourceFile... sourceFiles)
Converts source files to files.
|
static String[] |
SourceFile.toPaths(SourceFile[] sourceFiles)
Converts source files to file paths.
|
static void |
SourceFile.touch(SourceFile... sourceFiles)
Touch the given source files.
|
void |
JSweetTranspiler.transpile(TranspilationHandler transpilationHandler,
SourceFile... files)
Transpiles the given Java source files.
|
| Modifier and Type | Method and Description |
|---|---|
void |
TypeScript2JavaScriptTranspiler.OnTsTranspilationCompletedCallback.call(boolean fullPass,
ErrorCountTranspilationHandler handler,
Collection<SourceFile> files) |
protected abstract void |
TypeScript2JavaScriptTranspiler.doTranspile(ErrorCountTranspilationHandler transpilationHandler,
Collection<File> tsFiles,
Collection<SourceFile> tsSourceFiles,
JSweetOptions options,
boolean ignoreErrors,
TypeScript2JavaScriptTranspiler.OnTsTranspilationCompletedCallback onTsTranspilationCompleted) |
protected void |
TypeScript2JavaScriptWithTscTranspiler.doTranspile(ErrorCountTranspilationHandler transpilationHandler,
Collection<File> tsFiles,
Collection<SourceFile> tsSourceFiles,
JSweetOptions options,
boolean ignoreErrors,
TypeScript2JavaScriptTranspiler.OnTsTranspilationCompletedCallback onTsTranspilationCompleted) |
protected void |
TypeScript2JavaScriptWithTsserverTranspiler.doTranspile(ErrorCountTranspilationHandler transpilationHandler,
Collection<File> tsFiles,
Collection<SourceFile> tsSourceFiles,
JSweetOptions options,
boolean ignoreErrors,
TypeScript2JavaScriptTranspiler.OnTsTranspilationCompletedCallback onTsTranspilationCompleted) |
static SourcePosition |
SourceFile.findOriginPosition(SourcePosition position,
Collection<SourceFile> sourceFiles)
Finds the mapped position in one of the origin Java source file.
|
void |
TypeScript2JavaScriptTranspiler.ts2js(ErrorCountTranspilationHandler transpilationHandler,
Collection<SourceFile> tsSourceFiles,
Collection<File> tsDefDirs,
JSweetOptions options,
boolean ignoreErrors,
TypeScript2JavaScriptTranspiler.OnTsTranspilationCompletedCallback onTsTranspilationCompleted) |
| Modifier and Type | Method and Description |
|---|---|
EvaluationResult |
JavaEval.performEval(SourceFile[] sourceFiles) |
| Modifier and Type | Method and Description |
|---|---|
void |
AbstractDelegatedTranspilationHandler.onCompleted(JSweetTranspiler transpiler,
boolean fullPass,
SourceFile[] files) |
void |
ConsoleTranspilationHandler.onCompleted(JSweetTranspiler transpiler,
boolean fullPass,
SourceFile[] files) |