UNPKG

@specs-feup/kadabra

Version:

A Java source-to-source compiler written in Typescript

84 lines 2.61 kB
import { Class, Method } from "../Joinpoints.js"; /** * Opens a window with the AST of Spoon. * * @param name - The name of the AST window. */ export declare function showAST(name?: string): void; /** * Converts a primitive type to its wrapper class. * * @param type - The primitive type to convert. * @returns An object containing the wrapper class and whether the type is primitive. */ export declare function convertPrimitive(type: string): { wrapper: string; isPrimitive: boolean; }; /** * Converts a primitive type to its wrapper class as a string. * * @param type - The primitive type to convert. * @returns The wrapper class as a string. */ export declare function primitive2Class(type: string): string; /** * Inserts multiple print statements in the main method of a class. * * @param messages - The messages to print. */ export declare function printOnMain(...messages: string[]): void; /** * Inserts a print statement in the main method of a class. * * @param message - The message to print. */ export declare function printOnMain2(message: string): void; /** * Inserts code before the exit of the main method. * * @param code - The code to insert. */ export declare function beforeExitMain(code: string): void; /** * Inserts code before the exit of a method. * * @param method - The method join point. * @param code - The code to insert. */ export declare function beforeExit(method: Method, code: string): void; /** * Generates API names for concurrent package components. * * @returns An object containing the API names. */ export declare function getAPINames(): { concurrentPackage: string; channel: string; thread: string; product: string; }; /** * Generates code to retrieve an integer property from the system. * * @param name - The name of the property. * @param defaultValue - The default value of the property (optional). * @returns The generated code as a string. */ export declare function integerProperty(name: string, defaultValue?: string): string; /** * Retrieves methods based on class and method names. * * @param className - The name of the class. * @param methodName - The name of the method. * @returns An array of method join points. */ export declare function getMethod(className?: string, methodName?: string): Method | Method[] | undefined; /** * Retrieves classes based on class names. * * @param className - The name of the class. * @returns An array of class join points. */ export declare function getClass(className?: string): Class | Class[] | undefined; //# sourceMappingURL=Utils.d.ts.map