Constructors

Methods

  • Creates a binary expression.

    Parameters

    • operator:
          | ">"
          | "<"
          | "+"
          | "-"
          | "*"
          | "/"
          | "%"
          | "||"
          | "&&"
          | "|"
          | "^"
          | "&"
          | "=="
          | "!="
          | "<="
          | ">="
          | "<<"
          | ">>"
          | ">>>"
          | "instanceof"

      The string representing the operator, can be one of "+", "-", "*", "/", "%", "||", "&&", "|", "^", "&", "==", "!=", "<", ">", "<=", ">=", "<<", ">>", ">>>" or "instanceof".

    • lhs: Joinpoint

      The left-hand side, must be a join point of type expression.

    • rhs: Joinpoint

      The right-hand side, must be a join point of type expression.

    Returns any

    An expression representing the literal. If the literal is a negative number, it will return a unaryExpression, otherwise returns a literal.

  • Creates a comment node.

    Parameters

    • comment: string = ""

      The string representing the contents of a comment.

    • type:
          | "File"
          | "Javadoc"
          | "Inline"
          | "Block" = "Block"

    Returns any

    A node representing the comment

  • Creates a literal node.

    Parameters

    • literal: string

      The string representing the literal. Can pass negative literals.

    • type:
          | "boolean"
          | "long"
          | "float"
          | "int"
          | "char"
          | "double"
          | "String"

      The type of the literal. Can be one of int, long, float, double, char, String or boolean.

    Returns any

    An expression representing the literal.

  • Creates a unary expression.

    Parameters

    • operator:
          | "+"
          | "-"
          | "!"
          | "~"
          | "++_"
          | "--_"
          | "_++"
          | "_--"
          | "++"
          | "--"

      The string representing the operator, can be one of "+", "-", "!", "~", "++", "--", "++", "--", "++" or "--".

    • operand: Joinpoint

      The operand, must be a join point of type expression.

    Returns any

    An expression representing the literal. If the literal is a negative number, it will return a unaryExpression, otherwise returns a literal.

  • Creates a reference to a local variable.

    Parameters

    • localVariable: Joinpoint

      The local variable declaration to which we will create a variable reference.

    • isWrite: boolean = false

      True if the variable will be written, false if it will be read. By default creates variables for reading.

    Returns any

    A reference to a variable.