| 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 | Field and Description |
|---|---|
protected JSweetContext |
JSweetDiagnosticHandler.context
The transpilation context.
|
| Modifier and Type | Method and Description |
|---|---|
JSweetContext |
JSweetFactory.createContext(JSweetOptions options)
Creates the transpiler's context or any subclass.
|
JSweetContext |
JSweetTranspiler.getContext() |
| Modifier and Type | Method and Description |
|---|---|
PrinterAdapter |
JSweetFactory.createAdapter(JSweetContext context)
Creates the printer adapter or any subclass.
|
GlobalBeforeTranslationScanner |
JSweetFactory.createBeforeTranslationScanner(TranspilationHandler transpilationHandler,
JSweetContext context)
Creates the scanner which is called before translating the program.
|
JSweetDiagnosticHandler |
JSweetFactory.createDiagnosticHandler(TranspilationHandler transpilationHandler,
JSweetContext context)
Creates a diagnostic handler (responsible for reporting Java
errors/warnings).
|
Java2TypeScriptTranslator |
JSweetFactory.createTranslator(PrinterAdapter adapter,
TranspilationHandler transpilationHandler,
JSweetContext context,
com.sun.tools.javac.tree.JCTree.JCCompilationUnit compilationUnit,
boolean fillSourceMap)
Creates the core translator or any subclass.
|
| Constructor and Description |
|---|
GlobalBeforeTranslationScanner(TranspilationHandler logHandler,
JSweetContext context)
Creates a new global scanner.
|
Java2TypeScriptTranslator(PrinterAdapter adapter,
TranspilationHandler logHandler,
JSweetContext context,
com.sun.tools.javac.tree.JCTree.JCCompilationUnit compilationUnit,
boolean fillSourceMap)
Creates a new TypeScript translator.
|
JSweetDiagnosticHandler(TranspilationHandler transpilationHandler,
JSweetContext context)
Creates a new diagnostic handler.
|
OverloadScanner(TranspilationHandler logHandler,
JSweetContext context)
Creates a new overload scanner.
|
StaticInitilializerAnalyzer(JSweetContext context)
Creates the analyzer.
|
| Modifier and Type | Field and Description |
|---|---|
protected JSweetContext |
PrinterAdapter.context |
| Modifier and Type | Method and Description |
|---|---|
JSweetContext |
PrinterAdapter.getContext()
Gets the transpiler's context.
|
| Modifier and Type | Method and Description |
|---|---|
Java2TypeScriptAdapter |
RemoveJavaDependenciesFactory.createAdapter(JSweetContext context) |
| Constructor and Description |
|---|
Java2TypeScriptAdapter(JSweetContext context)
Creates a root adapter (with no parent).
|
PrinterAdapter(JSweetContext context)
Creates a root adapter (with no parent).
|
RemoveJavaDependenciesAdapter(JSweetContext context) |
| Modifier and Type | Field and Description |
|---|---|
protected JSweetContext |
AbstractTreeScanner.context
The transpiler context.
|
JSweetContext |
JavaCompilationEnvironment.context
The compilation context.
|
| Modifier and Type | Method and Description |
|---|---|
JSweetContext |
AbstractTreeScanner.getContext()
Gets the transpiler context.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
JSDoc.adaptDocComment(JSweetContext context,
com.sun.tools.javac.tree.JCTree.JCCompilationUnit compilationUnit,
com.sun.tools.javac.tree.JCTree element,
String commentText)
Adapts the JavaDoc comment for a given element to conform to JSDoc.
|
static void |
Util.findDefaultMethodsInType(Set<Map.Entry<com.sun.tools.javac.tree.JCTree.JCClassDecl,com.sun.tools.javac.tree.JCTree.JCMethodDecl>> defaultMethods,
JSweetContext context,
com.sun.tools.javac.code.Symbol.ClassSymbol classSymbol)
Fills the given set with all the default methods found in the current type
and super interfaces.
|
static String |
JSDoc.getMappedDocType(JSweetContext context,
com.sun.tools.javac.tree.JCTree typeTree,
com.sun.tools.javac.code.Type type)
Gets the JSDoc type from a Java type tree and/or type.
|
static com.sun.tools.javac.code.Symbol.PackageSymbol |
Util.getPackageByName(JSweetContext context,
String qualifiedName)
Looks up a package element from its qualified name.
|
static com.sun.tools.javac.code.Symbol.ClassSymbol |
Util.getTypeByName(JSweetContext context,
String qualifiedName)
Looks up a type element from its qualified name.
|
static com.sun.tools.javac.tree.JCTree |
Util.lookupTree(JSweetContext context,
Element element)
Gets the tree that corresponds to the given element (this is a slow
implementation - do not use intensively).
|
static String |
JSDoc.replaceLinks(JSweetContext context,
String text)
Replaces Java links by JSDoc links in a doc text.
|
| Constructor and Description |
|---|
AbstractTreePrinter(TranspilationHandler logHandler,
JSweetContext context,
com.sun.tools.javac.tree.JCTree.JCCompilationUnit compilationUnit,
PrinterAdapter adapter,
boolean fillSourceMap)
Creates a new printer.
|
AbstractTreeScanner(TranspilationHandler logHandler,
JSweetContext context,
com.sun.tools.javac.tree.JCTree.JCCompilationUnit compilationUnit)
Creates a new scanner.
|