ANTAREX API

Clava API

LARA API

LARA Common Language API

Clava

Clava

Clava

Static Members

addExistingFile

addExistingFile(path)

Parameters

path: J#java.io.File|string - Path to an existing source file that will be added to the AST. If the file does not exists, throws an exception.

addFile

addFile($file)

Parameters

$file: $file - The file to add to the AST.

cLinkageBegin

cLinkageBegin

cLinkageEnd

cLinkageEnd

findJp

findJp($jp)

Looks for a join point in the current AST.

Parameters

$jp: any - a join point from any AST

Returns

any - the equivalent join point from the AST at the top of the current AST stack

getAvailableIncludes

getAvailableIncludes()

Returns

J#List<include> - a list of join points representing available user includes

getBaseFolder

getBaseFolder()

Returns

J#java.io.File - The folder of the first input source element, either itself, if a folder, or the parent folder, if it is a file.

getData

getData()

Returns

any - DataStore with the data of the current weaver

getIncludeFolders

getIncludeFolders()

Returns

J#Set<String> - a set with paths to the include folders of the current configuration.

getProgram

getProgram()

Returns

any - the join point $program.

getStackSize

getStackSize()

The current number of elements in the AST stack.


getStandard

getStandard()

Returns the standard being used for compilation.


getWeavingFolder

getWeavingFolder()

Returns

J#java.io.File - The folder where the code represented by the AST will be written at the end of execution.

isCxx

isCxx()

popAst

popAst()

Discards the AST at the top of the current AST stack.


pushAst

pushAst([$program = undefined])

Creates a clone of the current AST and pushes the clone to the top of the current AST stack. If a $program join point is passed, that join point is added to the top of the stack instead.

Parameters

$program: $program - program to push to the AST. (optional)

rebuild

rebuild()

rebuildFuzzy

rebuildFuzzy()

runClava

runClava(args)

Launches a Clava weaving session.

Parameters

args: (string|Array) - The arguments to pass to the weaver, as if it was launched from the command-line

Returns

Boolean - true if the weaver execution without problems, false otherwise

runClavaParallel

runClavaParallel(argsLists, [threads = -1], [clavaCommand = []])

Launches several Clava 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)
clavaCommand: string[]|string - The command we should use to call Clava (e.g., /usr/local/bin/clava) (optional)

Returns

Boolean - true if none of the weaver executions had problems, false otherwise

useSpecsLogger

useSpecsLogger

Enables/disables library SpecsLogger for printing.
<p>
By default, is disabled.


writeCode

writeCode(outputFoldername)

Writes the code of the current AST to the given folder.

Parameters

outputFoldername: any