You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
953 B
21 lines
953 B
import { CodeBlock } from '../utils/commonCodeMod';
|
|
/**
|
|
* Find java or kotlin new class instance code block
|
|
*
|
|
* @param contents source contents
|
|
* @param classDeclaration class declaration or just a class name
|
|
* @param language 'java' | 'kt'
|
|
* @returns `CodeBlock` for start/end offset and code block contents
|
|
*/
|
|
export declare function findNewInstanceCodeBlock(contents: string, classDeclaration: string, language: 'java' | 'kt'): CodeBlock | null;
|
|
/**
|
|
* Append contents to the end of code declaration block, support class or method declarations.
|
|
*
|
|
* @param srcContents source contents
|
|
* @param declaration class declaration or method declaration
|
|
* @param insertion code to append
|
|
* @returns updated contents
|
|
*/
|
|
export declare function appendContentsInsideDeclarationBlock(srcContents: string, declaration: string, insertion: string): string;
|
|
export declare function addImports(source: string, imports: string[], isJava: boolean): string;
|