| Package | Description |
|---|---|
| org.jsweet.transpiler |
This package contains the JSweet Java to JavaScript transpiler
implementation.
|
| org.jsweet.transpiler.extension |
This package contains the basic extensions of the JSweet transpiler, as
printer adapters.
|
| org.jsweet.transpiler.util |
This package contains utilities for the JSweet transpiler.
|
| Modifier and Type | Class and Description |
|---|---|
class |
Java2TypeScriptTranslator
This is a TypeScript printer for translating the Java AST to a TypeScript
program.
|
| Modifier and Type | Method and Description |
|---|---|
AbstractTreePrinter |
Java2TypeScriptTranslator.printConstructorArgList(com.sun.tools.javac.tree.JCTree.JCNewClass newClass,
boolean localClass) |
AbstractTreePrinter |
Java2TypeScriptTranslator.substituteAndPrintType(com.sun.tools.javac.tree.JCTree typeTree) |
| Constructor and Description |
|---|
TypeChecker(AbstractTreePrinter translator)
Creates a new type checker object.
|
| Modifier and Type | Method and Description |
|---|---|
AbstractTreePrinter |
PrinterAdapter.getPrinter()
Gets the printer on which rely the adapter (this is not recommended).
|
| Modifier and Type | Method and Description |
|---|---|
void |
PrinterAdapter.setPrinter(AbstractTreePrinter printer)
Sets the printer attached to this adapter.
|
| Modifier and Type | Method and Description |
|---|---|
AbstractTreePrinter |
AbstractTreePrinter.endIndent()
Decrements the current indentation value.
|
AbstractTreePrinter |
AbstractTreePrinter.print(com.sun.tools.javac.tree.JCTree tree)
Print a given AST.
|
AbstractTreePrinter |
AbstractTreePrinter.print(String string)
Outputs a string (new lines are not allowed).
|
AbstractTreePrinter |
AbstractTreePrinter.printArgList(com.sun.tools.javac.tree.JCTree.JCMethodInvocation inv)
Prints an invocation argument list, with type assignment.
|
AbstractTreePrinter |
AbstractTreePrinter.printArgList(List<com.sun.tools.javac.code.Type> assignedTypes,
List<? extends com.sun.tools.javac.tree.JCTree> args) |
AbstractTreePrinter |
AbstractTreePrinter.printArgList(List<com.sun.tools.javac.code.Type> assignedTypes,
List<? extends com.sun.tools.javac.tree.JCTree> args,
Consumer<com.sun.tools.javac.tree.JCTree> printer)
Prints a comma-separated list of subtrees.
|
abstract AbstractTreePrinter |
AbstractTreePrinter.printConstructorArgList(com.sun.tools.javac.tree.JCTree.JCNewClass newClass,
boolean localClass) |
AbstractTreePrinter |
AbstractTreePrinter.printIdentifier(com.sun.tools.javac.code.Symbol symbol)
Outputs an identifier.
|
AbstractTreePrinter |
AbstractTreePrinter.printIndent()
Prints an indentation for the current indentation value.
|
AbstractTreePrinter |
AbstractTreePrinter.println()
Outputs a new line.
|
AbstractTreePrinter |
AbstractTreePrinter.println(String string)
Outputs a string and new line
|
AbstractTreePrinter |
AbstractTreePrinter.printTypeArgList(List<? extends com.sun.tools.javac.tree.JCTree> args)
Prints a comma-separated list of type subtrees.
|
AbstractTreePrinter |
AbstractTreePrinter.printVarNameList(List<com.sun.tools.javac.tree.JCTree.JCVariableDecl> args)
Prints a comma-separated list of variable names (no types).
|
AbstractTreePrinter |
AbstractTreePrinter.removeLastChar()
Removes the last output character.
|
AbstractTreePrinter |
AbstractTreePrinter.removeLastChars(int count)
Removes the last output characters.
|
AbstractTreePrinter |
AbstractTreePrinter.removeLastIndent()
Removes the last printed indentation.
|
AbstractTreePrinter |
AbstractTreePrinter.space()
Adds a space to the output.
|
AbstractTreePrinter |
AbstractTreePrinter.startIndent()
Increments the current indentation value.
|
AbstractTreePrinter |
AbstractTreePrinter.substituteAndPrintAssignedExpression(com.sun.tools.javac.code.Type assignedType,
com.sun.tools.javac.tree.JCTree.JCExpression expression)
Print an expression being assigned to a type (should handled necessary
wraping/unwraping).
|
abstract AbstractTreePrinter |
AbstractTreePrinter.substituteAndPrintType(com.sun.tools.javac.tree.JCTree typeTree) |