@specs-feup/lara
Version:
A js port of the popular framework for building source-to-source compilers
94 lines • 3.79 kB
TypeScript
import { LaraJoinPoint } from "../LaraJoinPoint.js";
import { JavaClasses } from "../lara/util/JavaTypes.js";
/**
* @internal Lara Common Language dirty hack. IMPROPER USAGE WILL BREAK THE WHOLE WEAVER!
*/
export declare function setUsingLaraCommonLanguage(value?: boolean): void;
/**
* Contains utility methods related to the weaver.
*/
export default class Weaver {
/**
* If defined, sets the default weaver command.
*/
static DEFAULT_WEAVER_COMMAND: undefined;
/**
* @returns The Java instance of the current WeaverEngine
*/
static getWeaverEngine(): JavaClasses.WeaverEngine;
static getLaraLoc(): any;
static getLaraLocTotals(): any;
static writeCode(outputFolder: any): void;
/**
* @deprecated Use the javascript `instanceof` operator instead
*/
static isJoinPoint($joinpoint: LaraJoinPoint): boolean;
/**
* @param joinPointType - The type of the join point
* @returns The name of the default attribute for the given join point type, or undefined if there is no default attribute
*/
static getDefaultAttribute<T extends typeof LaraJoinPoint>(joinPointType: T): keyof T | null;
static getDefaultAttribute(joinPointType: string): string | null;
static getDefaultAttribute<T extends typeof LaraJoinPoint>(joinPointType: T | string): keyof T | string | null;
/**
* Finds the name of the joinpoint class, given the js wrapper class itself
* @param type - The joinpoint class to find the name of
* @returns The name of the joinpoint class
*/
static findJoinpointTypeName<T extends typeof LaraJoinPoint>(type: T): string | undefined;
static findJoinpointType(name: string): typeof LaraJoinPoint | undefined;
/**
* @param jpTypeName - a join point, or the name of a join point
* @param attributeName - the name of the attribute to check
*
* @returns True, if the given join point or join point name support the attribute with the given name
*
* @deprecated The typescript compiler will tell you this
*/
static hasAttribute(jpTypeName: string, attributeName: string): boolean;
/**
* Converts a given join point to a string.
*
* @param $jp - The join point to serialize.
*
* @returns A string representation of the join point.
*/
static serialize($jp: LaraJoinPoint): string;
/**
* Converts a serialized join point back to an object.
*
* @param string - The serialized join point.
*
* @returns The deserialized join point.
*/
static deserialize(string: string): LaraJoinPoint;
/**
* An instance of the basic interface that the AST nodes must support.
*/
static AST_METHODS: any;
/**
* Adapts a Java object to JavaScript. Currently converts:
*
* - Null to undefined;
* - Java array to JS array;
* - List to array;
*
*/
static toJs(javaObject: any): any;
/**
* @returns The name of the currently executing LARA compiler.
*/
static getName(): string;
/**
* Launches several weaving sessions in parallel.
*
* @param argsLists - An array where each element is an array with the arguments to pass to the weaver, as if it was launched from the command-line
* @param threads - Number of threads to use
* @param weaverCommand - The command we should use to call the weaver (e.g., /usr/local/bin/clava)
*
* @returns A list with the results of each of the executions. The executing script must use weaver.Script to set the output (i.e. Script.setOutput())
*/
static runParallel(argsLists: string[][], threads?: number, weaverCommand?: string | string[]): any[];
static get laraArgs(): any;
}
//# sourceMappingURL=Weaver.d.ts.map