public class RemoveJavaDependenciesFactory extends JSweetFactory
By default, the transpiler generates lists, maps and other Java elements as is. It expects the J4TS runtime and assumes a default implementation at runtime.
When this extension is selected, the transpiler will try to translate Java APIs to native JavaScript APIs. It will report transpilation errors when a Java element cannot be translated to a JavaScript element.
logger| Constructor and Description |
|---|
RemoveJavaDependenciesFactory() |
| Modifier and Type | Method and Description |
|---|---|
Java2TypeScriptAdapter |
createAdapter(JSweetContext context)
Creates the printer adapter or any subclass.
|
createBeforeTranslationScanner, createContext, createDiagnosticHandler, createTranslatorpublic Java2TypeScriptAdapter createAdapter(JSweetContext context)
JSweetFactoryThis is the method to be overridden to create composable extensions. Adapters are chainable (decorator pattern) and new adapters will delegate to parent adapters when not overriding the parent behavior.
For instance, here my own adapter will override the needed behavior and delegate to the default adapter chain:
@Override
public PrinterAdapter createAdapter(JSweetContext context) {
return new MyOwnAdapter(super.createAdapter(context));
}
createAdapter in class JSweetFactory