* Turns a raw javascript method name (eg: 'import') into a safe Java method name (eg: 'doImport'). * @param methodName
(methodName: string)
| 689 | * @param methodName |
| 690 | */ |
| 691 | private static safeJavaMethodName(methodName: string) { |
| 692 | if (!methodName) { |
| 693 | return methodName; |
| 694 | } |
| 695 | |
| 696 | if (methodName === '_') { |
| 697 | // Different pattern for this one. Also this should never happen, who names a function '_' ?? |
| 698 | return 'doIt'; |
| 699 | } |
| 700 | |
| 701 | if (JavaGenerator.RESERVED_KEYWORDS.includes(methodName)) { |
| 702 | return `do${jsiiToPascalCase(methodName)}`; |
| 703 | } |
| 704 | return methodName; |
| 705 | } |
| 706 | |
| 707 | /** If false, @Generated will not include generator version nor timestamp */ |
| 708 | private emitFullGeneratorInfo?: boolean; |
no test coverage detected