See: Description
| Class | Description |
|---|---|
| AddPrefixToNonPublicMembersAdapter |
This simple adapter renames non-public members by adding two underscores as a
prefix.
|
| AnnotationManager |
This class has to be overridden to adapt the way annotations are introspected
on the Java AST.
|
| BigDecimalAdapter |
This optional adapter tunes the JavaScript generation to map the Java's
BigDecimal API to the Big JavaScript library.
|
| DisallowGlobalVariablesAdapter |
This simple adapter reports errors when global variables are found.
|
| ExtensionManager |
This class deals with the extension directory, which can contain classes to
tune the transpiler's default behavior.
|
| Java2TypeScriptAdapter |
This is an adapter for the TypeScript code generator.
|
| MapAdapter |
This optional adapter tunes the JavaScript generation to use JavaScript ES6
maps to implement Java maps.
|
| PrinterAdapter |
A printer adapter, which can be overridden to change the default printer
behavior.
|
| RemoveJavaDependenciesAdapter |
An adapter that removes many uses of Java APIs and replace them with
JavaScript equivalent when possible.
|
| RemoveJavaDependenciesFactory |
Tunes the transpiler to avoid using Java APIs as much as possible (JDK).
|
| StringEnumAdapter |
This optional adapter tunes the JavaScript generation to remove enums and
replace them with strings.
|
| Enum | Description |
|---|---|
| AnnotationManager.Action |
The action to be returned by the manager to add or remove annotations.
|
A printer adapter is an object that can override the JSweet's default
printer. The programmer needs to subclass the
PrinterAdapter class and use a
factory that creates an instance of this subclass. Printer adapters shall
avoid using the javac API in order to rely on public and stable interfaces,
such as the javax.lang.model and org.jsweet.transpiler.model.
Printer adapters are chainable (decorator pattern) and the default behavior
defined in PrinterAdapter is to
delegate to the parent adapter if any. To enhance reuse of adapters,
programmers should use delegation rather than subclassing.