import { JavaClasses } from "@specs-feup/lara/api/lara/util/JavaTypes.js";
import * as Joinpoints from "../Joinpoints.js";
/**
 * Utility methods related with the creation of new join points.
 *
 */
export default class ClavaJoinPoints {
    static toJoinPoint(node: any): Joinpoints.Joinpoint;
    /**
     * @returns True, if the two AST nodes are equal (internal representation. Not actual Joinpoint types), in the sense that the underlying AST nodes are also equal, according to their .equals() method (might return true for different AST nodes).
     * @internal
     * @deprecated Internal representations of join points should not be exposed to the public API.
     */
    static equals(jp1: any, jp2: any): boolean;
    static builtinType(code: string): Joinpoints.BuiltinType;
    static pointerFromBuiltin(code: string): Joinpoints.PointerType;
    static pointer($type: Joinpoints.Type): Joinpoints.PointerType;
    /**
     * Builds an array type of constant dimensions.
     *
     * @param type - Represents the inner type of the array. If passed a string then it will be converted to a literal type.
     * @param dims - Represents the dimensions of the array.
     **/
    static constArrayType(type: Joinpoints.Type | string, ...dims: number[]): Joinpoints.ArrayType;
    static variableArrayType($type: Joinpoints.Type, $sizeExpr: Joinpoints.Expression): Joinpoints.VariableArrayType;
    static incompleteArrayType($type: Joinpoints.Type): Joinpoints.IncompleteArrayType;
    static exprLiteral(code: string): Joinpoints.Expression;
    static exprLiteral(code: string, type: Joinpoints.Type | string): Joinpoints.Expression;
    /**
     *
     * @param type - The type of the constructed object
     * @param constructorArguments - Arguments passed to the constructor function
     *
     */
    static cxxConstructExpr(type: Joinpoints.Type, ...constructorArguments: string[] | Joinpoints.Joinpoint[]): any;
    static varDecl(varName: string, init: Joinpoints.Joinpoint): Joinpoints.Vardecl;
    static varDeclNoInit(varName: string, type: Joinpoints.Type): Joinpoints.Vardecl;
    /**
     * Creates a new literal join point 'type'.
     *
     * @param typeString - The literal code of the type
     */
    static typeLiteral(typeString: string): Joinpoints.Type;
    /**
     * Creates a new join point 'file'.
     *
     * @param filename - Name of the source file. If filename represents a path to an already existing file, literally adds the contents of the file to the join point.
     * @param path - The path of the new file, relative to the output folder. Absolute paths are not allowed. This path will be required when including the file (e.g., #include "<path>/<filename>")
     */
    static file(filename: string | JavaClasses.File, path?: string): Joinpoints.FileJp;
    /**
     * @param filename - Name of the source file.
     * @param source - The contents of the source file.
     * @param path - The path of the new file, relative to the output folder. Absolute paths are not allowed. This path will be required when including the file (e.g., #include "<path>/<filename>")
     */
    static fileWithSource(filename: string, source: string, path?: string): Joinpoints.FileJp;
    /**
     * Creates a new literal join point 'stmt'.
     *
     * @param stmtString - The literal code of the statement.
     */
    static stmtLiteral(stmtString: string): Joinpoints.Statement;
    static emptyStmt(): Joinpoints.Statement;
    /**
     * Creates a new join point 'call'.
     *
     * @param $function - The function for which the call will refer to.
     * @param callArgs - The arguments of the function.
     */
    static call($function: Joinpoints.FunctionJp, ...callArgs: Joinpoints.Expression[]): Joinpoints.Call;
    /**
     * Creates a new join point 'call'.
     *
     * @param functionName - The name of the function to call.
     * @param $returnType - The return type of the function.
     * @param callArgs - The arguments of the function.
     */
    static callFromName(functionName: string, $returnType: Joinpoints.Type, ...callArgs: Joinpoints.Expression[]): Joinpoints.Call;
    /**
     * Creates a new join point 'switch'
     *
     */
    static switchStmt($conditionExpr: Joinpoints.Expression, ...cases: Joinpoints.Expression[]): Joinpoints.Switch;
    static omp(directiveName: string): Joinpoints.Omp;
    static scope(...$jps: Joinpoints.Joinpoint[]): Joinpoints.Scope;
    /**
     *
     * @param decl - The variable declaration Joinpoint
     */
    static varRef(decl: Joinpoints.Vardecl): Joinpoints.Varref;
    /**
     * @param decl - The name of the varref.
     * @param $type - The type of the varref.
     */
    static varRef(decl: string, $type: Joinpoints.Type): Joinpoints.Varref;
    /**
     * @param declName - The name of the varref.
     * @deprecated use ClavaJoinPoints.varRef() instead
     */
    static varRefFromDecl($namedDecl: Joinpoints.Vardecl): Joinpoints.Varref;
    /**
     * @param $expr - An expression to return.
     */
    static returnStmt($expr?: Joinpoints.Expression): Joinpoints.ReturnStmt;
    /**
     * Creates a new join point 'functionType'.
     *
     * @param $returnType - The return type of the function type.
     * @param argTypes - The types of the arguments of the function type.
     */
    static functionType($returnType: Joinpoints.Type, ...argTypes: Joinpoints.Type[]): Joinpoints.FunctionType;
    /**
     * Creates a new join point 'function'.
     *
     * @param functionName - The name of the function.
     * @param $functionType - The type of the function.
     */
    static functionDeclFromType(functionName: string, $functionType: Joinpoints.FunctionType): Joinpoints.FunctionJp;
    /**
     * Creates a new join point 'function'.
     * // TODO update docs
     *
     * @param functionName - The name of the function.
     * @param $returnType - The return type of the function
     * @param params - The parameters of the function.
     */
    static functionDecl(functionName: string, $returnType: Joinpoints.Type, ...params: Joinpoints.Decl[]): Joinpoints.FunctionJp;
    static assign($leftHand: Joinpoints.Expression, $rightHand: Joinpoints.Expression): Joinpoints.BinaryOp;
    static compoundAssign(op: string, $leftHand: Joinpoints.Expression, $rightHand: Joinpoints.Expression): Joinpoints.BinaryOp;
    /**
     * Creates a new join point 'if'.
     *
     * @param $condition - The condition of the if statement. If a string, it is converted to a literal expression.
     * @param $then - The body of the if
     * @param $else - The body of the else
     *
     */
    static ifStmt($condition: Joinpoints.Expression | string, $then?: Joinpoints.Statement, $else?: Joinpoints.Statement): Joinpoints.If;
    /**
     * Creates a new join point 'binaryOp'.
     *
     * @param op - The binary operator kind.
     * @param $left - The left hand of the binary operator. If a string, it is converted to a literal expression.
     * @param $right - The right hand of the binary operator. If a string, it is converted to a literal expression.
     * @param $type - The return type of the operator. If a string, it is converted to a literal type.
     */
    static binaryOp(op: string, $left: Joinpoints.Expression | string, $right: Joinpoints.Expression | string, $type?: Joinpoints.Type | string): Joinpoints.BinaryOp;
    /**
     * Creates a new join point 'unaryOp'.
     *
     * @param op - The unary operator kind.
     * @param $expr - The sub-expression of the unary operator. If a string, it is converted to a literal expression.
     * @param $type - The return type of the operator. If undefined, tries to infer the correct type based on the type of the $expr (inference might not be implemented for all operators).
     */
    static unaryOp(op: string, $expr: Joinpoints.Expression, $type?: Joinpoints.Type | string): Joinpoints.UnaryOp;
    /**
     * Creates a new join point 'unaryOp'.
     *
     * @param op - The unary operator kind.
     * @param $expr - The sub-expression of the unary operator. If a string, it is converted to a literal expression.
     * @param $type - The return type of the operator that will be converted to a literal type.
     */
    static unaryOp(op: string, $expr: string, $type: Joinpoints.Type | string): Joinpoints.UnaryOp;
    /**
     * Creates a new join point 'ternaryOp'
     *
     * @param $cond - The condition of the operator
     * @param $trueExpr - The result when $cond evaluates to true
     * @param $falseExpr - The result when $cond evaluates to false
     * @param $type - The type of the operation
     * @returns The newly created join point
     */
    static ternaryOp($cond: Joinpoints.Expression | string, $trueExpr: Joinpoints.Expression | string, $falseExpr: Joinpoints.Expression | string, $type: Joinpoints.Type | string): Joinpoints.TernaryOp;
    /**
     * Creates a new join point 'expr' representing a parenthesis expression.
     *
     * @param $expr - The expression inside the parenthesis. If a string, it is converted to a literal expression.
     */
    static parenthesis($expr: Joinpoints.Expression | string): Joinpoints.Expression;
    /**
     * @param doubleLiteral - The number that will be a double literal.
     */
    static doubleLiteral(doubleLiteral: number | string): Joinpoints.Expression;
    /**
     * @param integerLiteral - The number that will be a integer literal.
     */
    static integerLiteral(integerLiteral: number | string): Joinpoints.Expression;
    /**
     * @param $typedefDecl - A typedef declaration.
     */
    static typedefType($typedefDecl: Joinpoints.TypedefDecl): Joinpoints.TypedefType;
    /**
     * @param $underlyingType - The underlying type of the typedef.
     * @param identifier - The name of the typedef.
     */
    static typedefDecl($underlyingType: Joinpoints.Type, identifier: string): Joinpoints.TypedefDecl;
    /**
     * @param $struct - a struct for the type
     * @returns An elaborated type for the given struct.
     */
    static structType($struct: Joinpoints.Struct): Joinpoints.ElaboratedType;
    /**
     * Represents an explicit C-style cast (e.g., (double) a).
     *
     */
    static cStyleCast($type: Joinpoints.Type, $expr: Joinpoints.Expression): Joinpoints.Cast;
    /**
     * Creates an empty class with the given name and fields.
     *
     */
    static classDecl(className: string, ...fields: Joinpoints.Field[]): Joinpoints.Class;
    /**
     * Creates an array access from the given base that represents an array, and several subscripts.
     *
     * Must provide at least one subscript, base expression must be of type array,
     * and have a defined number of dimensions. The number of subscripts must be lower or equal
     * than the number of dimensions of the array type.
     *
     */
    static arrayAccess(base: Joinpoints.Expression, ...subscripts: Joinpoints.Expression[]): Joinpoints.ArrayAccess;
    /**
     * Creates a initialization list expression (initList) from the values.
     *
     * Must provide at least one value, the element type of the initList will be the same as the type of the first element.
     *
     */
    static initList(...values: Joinpoints.Expression[]): Joinpoints.InitList;
    /**
     * Creates a field for a class.
     *
     */
    static field(fieldName: string, $fieldType: Joinpoints.Type): Joinpoints.Field;
    /**
     * Creates an access specifier (e.g., public:), for classes.
     *
     * @param accessSpecifier - One of public, protected, private or none.
     */
    static accessSpecifier(accessSpecifier: string): Joinpoints.AccessSpecifier;
    /**
     * Creates a new 'for' statement join point.
     *
     * @param $init - The initialization of the for statement. If a string, it is converted to a literal expression.
     * @param $condition - The condition of the for statement. If a string, it is converted to a literal expression.
     * @param $inc - The increment of the for statement. If a string, it is converted to a literal expression.
     * @param $body - The body of the for statement.
     *
     */
    static forStmt($init?: Joinpoints.Statement | string, $condition?: Joinpoints.Statement | string, $inc?: Joinpoints.Statement | string, $body?: Joinpoints.Statement | string): Joinpoints.Loop;
    static whileStmt($condition?: Joinpoints.Statement | string, $body?: Joinpoints.Statement | string): Joinpoints.Loop;
    static param(name: string, $type: Joinpoints.Type): Joinpoints.Param;
    /**
     * Tries to convert the given source into a join point, or throws an exception if it is not possible.
     *
     * If source is a string:
     *  - If it can be converted to a builtinType, returns a builtinType;
     *  - Otherwise, returns a typeLiteral;
     *
     * If source is a join point:
     *  - If is a $type, returns itself;
     *  - If the property .type is not undefined, returns .type;
     *  - Otherwise, throws an exception;
     *
     * @param source -
     * @returns A join point representing a type.
     */
    static type(source: Joinpoints.Type | Joinpoints.Joinpoint | string): Joinpoints.BuiltinType | Joinpoints.Type;
    static exprStmt($expr: Joinpoints.Expression): Joinpoints.ExprStmt;
    /**
     * Creates an empty class with the given name and fields.
     *
     */
    static declStmt(...decls: Joinpoints.Decl[]): Joinpoints.DeclStmt;
    /**
     * Creates a comment join point from the given text. If text has one line, creates an inline comment, otherwise creates a multi-line comment.
     *
     * @param text - The text of the comment
     * @returns A comment join point
     *
     */
    static comment(text: string): Joinpoints.Comment;
    static labelDecl(name: string): Joinpoints.LabelDecl;
    static labelStmt(nameOrDecl: Joinpoints.LabelDecl | string): Joinpoints.LabelStmt;
    static gotoStmt(labelDecl: Joinpoints.LabelDecl): Joinpoints.GotoStmt;
    static breakStmt(): Joinpoints.Break;
    static defaultStmt(): Joinpoints.Default;
    /**
     * Creates a new literal join point 'decl'.
     *
     * @param declString - The literal code of the decl.
     */
    static declLiteral(declString: string): Joinpoints.Decl;
    /**
     * Creates a new empty join point 'program'.
     *
     * @param declString - The literal code of the decl.
     */
    static program(): Joinpoints.Program;
}
//# sourceMappingURL=ClavaJoinPoints.d.ts.map