UNPKG

@specs-feup/kadabra

Version:

A Java source-to-source compiler written in Typescript

57 lines 2.4 kB
import { Class, FileJp, Method, InterfaceType, App } from "../Joinpoints.js"; /** * Retrieves an existing class or creates a new one. * * @param qualifiedName - The qualified name of the class. * @param extend - The class to extend (optional). * @param implement - The interfaces to implement (optional). * @param target - The target join point (optional). * @returns The class join point. */ export declare function getOrNewClass(qualifiedName: string, extend?: string, implement?: string[], target?: App | FileJp): Class; /** * Creates a new class. * * @param qualifiedName - The qualified name of the class. * @param extend - The class to extend (optional). * @param implement - The interfaces to implement (optional). * @param target - The target join point (optional). * @returns The newly created class join point. */ export declare function newClass(qualifiedName: string, extend?: string, implement?: string[], target?: App | FileJp): Class; /** * Generates a provider function. * * @param code - The code to be executed by the provider. * @param args - The arguments for the provider (optional). * @returns The provider function as a string. */ export declare function providerOf(code: string, args?: string[]): string; /** * Generates a functional interface based on a method of a class. * * @param targetMethod - The name of the target method. * @param targetClass - The name of the target class (optional). * @param targetFile - The name of the target file (optional). * @param associate - Whether to associate the interface with the class (optional). * @param newFile - Whether to create the interface in a new file (optional). * @returns The generated functional interface and related information. */ export declare function generateFunctionalInterface(targetMethod: string, targetClass?: string, targetFile?: string, associate?: boolean, newFile?: boolean): { $interface: InterfaceType; $defaultMethod: Method; $function: Method; targetMethodName: string; }; /** * Utility class for defining common modifiers. */ export declare class Mod { static readonly PRIVATE = "private"; static readonly PUBLIC = "public"; static readonly PROTECTED = "protected"; static readonly STATIC = "static"; static readonly PUBLIC_STATIC: string[]; static readonly PRIVATE_STATIC: string[]; } //# sourceMappingURL=Factory.d.ts.map