KADABRA API

LARA API

LARA Common Language API

(.js)
laraImport("kadabra.KadabraAst");

(.lara)
import kadabra.KadabraAst;

KadabraAst

KadabraAst

KadabraAst

Utility methods related with the searching join points and AST properties.


Static Members

getBinaryOperators

getBinaryOperators()

Returns

lara.util.StringSet - String set with valid binary operators

getConstantInitializations

getConstantInitializations(@param, $startingPoint)

Searches constant values. Currently, three types of constants are returned:

- Class fields which are final and initialized when declared;
- Assignments to final fields;
- Local variables which are final and initialized when declared;

Parameters

@param: any - {$jp} [$startingPoint = $root] - The join point where the search for constants will start (inclusive).
$startingPoint: any

Returns

$jp[] - an array of join points, which can either be a $field, an $assign or a $localVariable.

getHierarchy

getHierarchy()

Creates an object representing the class hierarchy of the current program.

Returns

map{string:$class[]} - map where the keys are String with the fully qualified name of the class, and the value is an array with $class join points that are subclasses of the class represented by the key. If the map returns undefined, this means that the class has no subclasses.

getUnaryOperators

getUnaryOperators()

Returns

lara.util.StringSet - String set with valid unary operators