mirror of
https://github.com/cincheo/jsweet.git
synced 2025-12-15 07:19:22 +00:00
add an afterTypeBody customization method to inject TS code at the end of type bodies
This commit is contained in:
parent
8e276782e8
commit
6841f03327
@ -1939,6 +1939,8 @@ public class Java2TypeScriptTranslator extends AbstractTreePrinter {
|
||||
removeLastChar().println();
|
||||
}
|
||||
|
||||
getAdapter().afterTypeBody(classdecl.sym);
|
||||
|
||||
if (!globals) {
|
||||
endIndent().printIndent().print("}");
|
||||
if (!getScope().interfaceScope && !getScope().declareClassScope && !getScope().enumScope
|
||||
|
||||
@ -1094,6 +1094,15 @@ public class PrinterAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called after printing the body of a type.
|
||||
*/
|
||||
public void afterTypeBody(TypeElement type) {
|
||||
if (parentAdapter != null) {
|
||||
parentAdapter.afterTypeBody(type);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adapts the JavaDoc comment for a given element.
|
||||
*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user