Package soot.JastAddJ

Class VariableDecl

    • Field Detail

      • tokenString_ID

        protected String tokenString_ID
      • IDstart

        public int IDstart
      • IDend

        public int IDend
    • Method Detail

      • fullCopy

        public VariableDecl fullCopy()
        Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
        Overrides:
        fullCopy in class ASTNode<ASTNode>
        Returns:
        dangling copy of the subtree at this node
      • init$Children

        public void init$Children()
        Initializes the child array to the correct size. Initializes List and Opt nta children.
        Overrides:
        init$Children in class ASTNode<ASTNode>
      • setID

        public void setID​(String value)
        Replaces the lexeme ID.
        Parameters:
        value - The new value for the lexeme ID.
      • setID

        public void setID​(Symbol symbol)
        JastAdd-internal setter for lexeme ID using the Beaver parser.
      • getID

        public String getID()
        Retrieves the value for the lexeme ID.
        Returns:
        The value for the lexeme ID.
      • setDimsList

        public void setDimsList​(List<Dims> list)
        Replaces the Dims list.
        Parameters:
        list - The new list node to be used as the Dims list.
      • getNumDims

        public int getNumDims()
        Retrieves the number of children in the Dims list.
        Returns:
        Number of children in the Dims list.
      • getNumDimsNoTransform

        public int getNumDimsNoTransform()
        Retrieves the number of children in the Dims list. Calling this method will not trigger rewrites..
        Returns:
        Number of children in the Dims list.
      • getDims

        public Dims getDims​(int i)
        Retrieves the element at index i in the Dims list..
        Parameters:
        i - Index of the element to return.
        Returns:
        The element at position i in the Dims list.
      • addDims

        public void addDims​(Dims node)
        Append an element to the Dims list.
        Parameters:
        node - The element to append to the Dims list.
      • addDimsNoTransform

        public void addDimsNoTransform​(Dims node)
      • setDims

        public void setDims​(Dims node,
                            int i)
        Replaces the Dims list element at index i with the new node node.
        Parameters:
        node - The new node to replace the old list element.
        i - The list index of the node to be replaced.
      • getDimss

        public List<Dims> getDimss()
        Retrieves the Dims list.
        Returns:
        The node representing the Dims list.
      • getDimssNoTransform

        public List<Dims> getDimssNoTransform()
        Retrieves the Dims list.

        This method does not invoke AST transformations.

        Returns:
        The node representing the Dims list.
      • getDimsList

        public List<Dims> getDimsList()
        Retrieves the Dims list.
        Returns:
        The node representing the Dims list.
      • getDimsListNoTransform

        public List<Dims> getDimsListNoTransform()
        Retrieves the Dims list.

        This method does not invoke AST transformations.

        Returns:
        The node representing the Dims list.
      • setInitOpt

        public void setInitOpt​(Opt<Expr> opt)
        Replaces the optional node for the Init child. This is the Opt node containing the child Init, not the actual child!
        Parameters:
        opt - The new node to be used as the optional node for the Init child.
      • hasInit

        public boolean hasInit()
        Check whether the optional Init child exists.
        Returns:
        true if the optional Init child exists, false if it does not.
      • getInit

        public Expr getInit()
        Retrieves the (optional) Init child.
        Returns:
        The Init child, if it exists. Returns null otherwise.
      • setInit

        public void setInit​(Expr node)
        Replaces the (optional) Init child.
        Parameters:
        node - The new node to be used as the Init child.
      • getInitOpt

        public Opt<Expr> getInitOpt()
      • getInitOptNoTransform

        public Opt<Expr> getInitOptNoTransform()
        Retrieves the optional node for child Init. This is the Opt node containing the child Init, not the actual child!

        This method does not invoke AST transformations.

        Returns:
        The optional node for child Init.