Class AVariableDeclaration

    • Field Summary

      • Fields inherited from class org.intocps.maestro.ast.node.Node

        _visitedNodes
    • Constructor Summary

      Constructors 
      Constructor Description
      AVariableDeclaration()
      Creates a new default constructor AVariableDeclaration node with no children.
      AVariableDeclaration​(LexIdentifier name_, Boolean external_, org.intocps.maestro.ast.node.PType type_, List<? extends org.intocps.maestro.ast.node.PExp> size_, org.intocps.maestro.ast.node.PInitializer initializer_)
      Deprecated.
      This method should not be used, use AstFactory instead.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void apply​(org.intocps.maestro.ast.analysis.intf.IAnalysis caller)
      Calls the IAnalysis.caseAVariableDeclaration(AVariableDeclaration) of the IAnalysis caller.
      <A> A apply​(org.intocps.maestro.ast.analysis.intf.IAnswer<A> caller)
      Calls the IAnswer.caseAVariableDeclaration(AVariableDeclaration) of the IAnswer caller.
      <Q> void apply​(org.intocps.maestro.ast.analysis.intf.IQuestion<Q> caller, Q question)
      Calls the IQuestion.caseAVariableDeclaration(AVariableDeclaration, Object) of the IQuestion caller.
      <Q,​A>
      A
      apply​(org.intocps.maestro.ast.analysis.intf.IQuestionAnswer<Q,​A> caller, Q question)
      Calls the IQuestionAnswer.caseAVariableDeclaration(AVariableDeclaration, Object) of the IQuestionAnswer caller.
      AVariableDeclaration clone()
      Returns a deep clone of this AVariableDeclaration node.
      AVariableDeclaration clone​(Map<org.intocps.maestro.ast.node.INode,​org.intocps.maestro.ast.node.INode> oldToNewMap)
      Creates a deep clone of this AVariableDeclaration node while putting all old node-new node relations in the map oldToNewMap.
      boolean equals​(Object o)
      Essentially this.toString().equals(o.toString()).
      Map<String,​Object> getChildren​(Boolean includeInheritedFields)
      Creates a map of all field names and their value
      Boolean getExternal()  
      org.intocps.maestro.ast.node.PInitializer getInitializer()  
      LinkedList<org.intocps.maestro.ast.node.PExp> getSize()  
      org.intocps.maestro.ast.node.PType getType()  
      int hashCode()
      Forwarding hashCode call to Object.hashCode().
      void removeChild​(org.intocps.maestro.ast.node.INode child)
      Removes the INode child as a child of this AVariableDeclaration node.
      void setExternal​(Boolean value)
      Sets the _external child of this AVariableDeclaration node.
      void setInitializer​(org.intocps.maestro.ast.node.PInitializer value)
      Sets the _initializer child of this AVariableDeclaration node.
      void setSize​(List<? extends org.intocps.maestro.ast.node.PExp> value)
      Sets the _size child of this AVariableDeclaration node.
      void setType​(org.intocps.maestro.ast.node.PType value)
      Sets the _type child of this AVariableDeclaration node.
      String toString()  
      • Methods inherited from class org.intocps.maestro.ast.node.Node

        cloneList, cloneList, cloneListExternal, cloneListExternal, cloneListList, cloneListList, cloneNode, cloneNode, compareTo, getAllFields, getAncestor, parent, parent, replaceChild
      • Methods inherited from interface org.intocps.maestro.ast.node.INode

        getAncestor, parent, parent, replaceChild
    • Constructor Detail

      • AVariableDeclaration

        public AVariableDeclaration()
        Creates a new default constructor AVariableDeclaration node with no children.
      • AVariableDeclaration

        public AVariableDeclaration​(LexIdentifier name_,
                                    Boolean external_,
                                    org.intocps.maestro.ast.node.PType type_,
                                    List<? extends org.intocps.maestro.ast.node.PExp> size_,
                                    org.intocps.maestro.ast.node.PInitializer initializer_)
        Deprecated.
        This method should not be used, use AstFactory instead. The basic child nodes are removed from their previous parents.
        Creates a new complete constructor AVariableDeclaration node with the given nodes as children.
        Parameters:
        external_ - the Boolean node for the external child of this AVariableDeclaration node
        type_ - the PType node for the type child of this AVariableDeclaration node
        size_ - the NodeList node for the size child of this AVariableDeclaration node
        initializer_ - the PInitializer node for the initializer child of this AVariableDeclaration node
    • Method Detail

      • getChildren

        public Map<String,​Object> getChildren​(Boolean includeInheritedFields)
        Creates a map of all field names and their value
        Specified by:
        getChildren in interface org.intocps.maestro.ast.node.INode
        Specified by:
        getChildren in interface PDeclaration
        Overrides:
        getChildren in class PDeclarationBase
        Parameters:
        includeInheritedFields - if true all inherited fields are included
        Returns:
        a a map of names to values of all fields
      • clone

        public AVariableDeclaration clone​(Map<org.intocps.maestro.ast.node.INode,​org.intocps.maestro.ast.node.INode> oldToNewMap)
        Creates a deep clone of this AVariableDeclaration node while putting all old node-new node relations in the map oldToNewMap.
        Specified by:
        clone in interface org.intocps.maestro.ast.node.INode
        Specified by:
        clone in interface PDeclaration
        Specified by:
        clone in class PDeclarationBase
        Parameters:
        oldToNewMap - the map filled with the old node-new node relation
        Returns:
        a deep clone of this AVariableDeclaration node
      • setType

        public void setType​(org.intocps.maestro.ast.node.PType value)
        Sets the _type child of this AVariableDeclaration node.
        Parameters:
        value - the new _type child of this AVariableDeclaration node
      • getType

        public org.intocps.maestro.ast.node.PType getType()
        Returns:
        the PType node which is the _type child of this AVariableDeclaration node
      • setSize

        public void setSize​(List<? extends org.intocps.maestro.ast.node.PExp> value)
        Sets the _size child of this AVariableDeclaration node.
        Parameters:
        value - the new _size child of this AVariableDeclaration node
      • setInitializer

        public void setInitializer​(org.intocps.maestro.ast.node.PInitializer value)
        Sets the _initializer child of this AVariableDeclaration node.
        Parameters:
        value - the new _initializer child of this AVariableDeclaration node
      • getInitializer

        public org.intocps.maestro.ast.node.PInitializer getInitializer()
        Returns:
        the PInitializer node which is the _initializer child of this AVariableDeclaration node
      • apply

        public void apply​(org.intocps.maestro.ast.analysis.intf.IAnalysis caller)
                   throws org.intocps.maestro.ast.analysis.AnalysisException
        Calls the IAnalysis.caseAVariableDeclaration(AVariableDeclaration) of the IAnalysis caller.
        Specified by:
        apply in interface org.intocps.maestro.ast.node.INode
        Specified by:
        apply in class org.intocps.maestro.ast.node.Node
        Parameters:
        caller - the IAnalysis to which this AVariableDeclaration node is applied
        Throws:
        org.intocps.maestro.ast.analysis.AnalysisException
      • apply

        public <A> A apply​(org.intocps.maestro.ast.analysis.intf.IAnswer<A> caller)
                    throws org.intocps.maestro.ast.analysis.AnalysisException
        Calls the IAnswer.caseAVariableDeclaration(AVariableDeclaration) of the IAnswer caller.
        Specified by:
        apply in interface org.intocps.maestro.ast.node.INode
        Specified by:
        apply in class org.intocps.maestro.ast.node.Node
        Parameters:
        caller - the IAnswer to which this AVariableDeclaration node is applied
        Returns:
        the answer as returned from caller
        Throws:
        org.intocps.maestro.ast.analysis.AnalysisException
      • apply

        public <Q> void apply​(org.intocps.maestro.ast.analysis.intf.IQuestion<Q> caller,
                              Q question)
                       throws org.intocps.maestro.ast.analysis.AnalysisException
        Calls the IQuestion.caseAVariableDeclaration(AVariableDeclaration, Object) of the IQuestion caller.
        Specified by:
        apply in interface org.intocps.maestro.ast.node.INode
        Specified by:
        apply in class org.intocps.maestro.ast.node.Node
        Parameters:
        caller - the IQuestion to which this AVariableDeclaration node is applied
        question - the question provided to caller
        Throws:
        org.intocps.maestro.ast.analysis.AnalysisException
      • apply

        public <Q,​A> A apply​(org.intocps.maestro.ast.analysis.intf.IQuestionAnswer<Q,​A> caller,
                                   Q question)
                            throws org.intocps.maestro.ast.analysis.AnalysisException
        Calls the IQuestionAnswer.caseAVariableDeclaration(AVariableDeclaration, Object) of the IQuestionAnswer caller.
        Specified by:
        apply in interface org.intocps.maestro.ast.node.INode
        Specified by:
        apply in class org.intocps.maestro.ast.node.Node
        Parameters:
        caller - the IQuestionAnswer to which this AVariableDeclaration node is applied
        question - the question provided to caller
        Returns:
        the answer as returned from answer
        Throws:
        org.intocps.maestro.ast.analysis.AnalysisException