ANTAREX API

Clava API

LARA API

LARA Common Language API

Weaver

Weaver

Weaver

Contains utility methods related to the weaver.


Static Members

deserialize

deserialize(string)

Converts a serialized join point back to an object.

Parameters

string: String - The serialized join point.

Returns

$jp - The deserialized join point.

getDefaultAttribute

getDefaultAttribute(joinPointType)

Parameters

joinPointType: String - the type of the join point

Returns

String - the name of the default attribute for the given join point type, or undefined if there is no default attribute

getLaraLoc

getLaraLoc()

getLaraLocTotals

getLaraLocTotals()

getName

getName()

Returns

String - the name of the currently executing LARA compiler.

getWeaverEngine

getWeaverEngine()

Returns

J#org.lara.interpreter.weaver.interf.WeaverEngine - the Java instance of the current WeaverEngine

hasAttribute

hasAttribute(jp, attributeName)

This function is deprecated. Use $jp.attributes instead

Parameters

jp: unknown
attributeName: unknown

Returns

boolean - true, if the given join point or join point name support the attribute with the given name

isJoinPoint

isJoinPoint($joinpoint, type)

Parameters

$joinpoint: any
type: String

runParallel

runParallel(argsLists, [threads = -1], [weaverCommand = []])

Launches several weaving sessions in parallel.

Parameters

argsLists: string[][] - 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
threads: int - Number of threads to use (optional)
weaverCommand: string[]|string - The command we should use to call the weaver (e.g., /usr/local/bin/clava) (optional)

Returns

Object[] - 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())

serialize

serialize(object)

Converts a given join point to a string.

Parameters

object: Object - The join point to serialize.

Returns

String - A string representation of the join point.

toJs

toJs(javaObject)

Adapts a Java object to JavaScript. Currently converts:

- Null to undefined;
- Java array to JS array;
- List to array;

Parameters

javaObject: unknown

writeCode

writeCode(outputFolder)

Parameters

outputFolder: unknown