Class AFunctionDeclaration

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<org.intocps.maestro.ast.node.INode>, org.intocps.maestro.ast.node.INode, PDeclaration

    public class AFunctionDeclaration
    extends PDeclarationBase
    Generated file by AST Creator
    Author:
    Kenneth Lausdahl
    See Also:
    Serialized Form
    • Field Summary

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

        _visitedNodes
    • Constructor Summary

      Constructors 
      Constructor Description
      AFunctionDeclaration()
      Creates a new default constructor AFunctionDeclaration node with no children.
      AFunctionDeclaration​(LexIdentifier name_, org.intocps.maestro.ast.node.PType returnType_, java.util.List<? extends org.intocps.maestro.ast.node.AFormalParameter> formals_)
      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.caseAFunctionDeclaration(AFunctionDeclaration) of the IAnalysis caller.
      <A> A apply​(org.intocps.maestro.ast.analysis.intf.IAnswer<A> caller)
      Calls the IAnswer.caseAFunctionDeclaration(AFunctionDeclaration) of the IAnswer caller.
      <Q> void apply​(org.intocps.maestro.ast.analysis.intf.IQuestion<Q> caller, Q question)
      Calls the IQuestion.caseAFunctionDeclaration(AFunctionDeclaration, Object) of the IQuestion caller.
      <Q,​A>
      A
      apply​(org.intocps.maestro.ast.analysis.intf.IQuestionAnswer<Q,​A> caller, Q question)
      Calls the IQuestionAnswer.caseAFunctionDeclaration(AFunctionDeclaration, Object) of the IQuestionAnswer caller.
      AFunctionDeclaration clone()
      Returns a deep clone of this AFunctionDeclaration node.
      AFunctionDeclaration clone​(java.util.Map<org.intocps.maestro.ast.node.INode,​org.intocps.maestro.ast.node.INode> oldToNewMap)
      Creates a deep clone of this AFunctionDeclaration node while putting all old node-new node relations in the map oldToNewMap.
      boolean equals​(java.lang.Object o)
      Essentially this.toString().equals(o.toString()).
      java.util.Map<java.lang.String,​java.lang.Object> getChildren​(java.lang.Boolean includeInheritedFields)
      Creates a map of all field names and their value
      java.util.LinkedList<org.intocps.maestro.ast.node.AFormalParameter> getFormals()  
      org.intocps.maestro.ast.node.PType getReturnType()  
      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 AFunctionDeclaration node.
      void setFormals​(java.util.List<? extends org.intocps.maestro.ast.node.AFormalParameter> value)
      Sets the _formals child of this AFunctionDeclaration node.
      void setReturnType​(org.intocps.maestro.ast.node.PType value)
      Sets the _returnType child of this AFunctionDeclaration node.
      java.lang.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 class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.intocps.maestro.ast.node.INode

        getAncestor, parent, parent, replaceChild
    • Constructor Detail

      • AFunctionDeclaration

        public AFunctionDeclaration​(LexIdentifier name_,
                                    org.intocps.maestro.ast.node.PType returnType_,
                                    java.util.List<? extends org.intocps.maestro.ast.node.AFormalParameter> formals_)
        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 AFunctionDeclaration node with the given nodes as children.
        Parameters:
        returnType_ - the PType node for the returnType child of this AFunctionDeclaration node
        formals_ - the NodeList node for the formals child of this AFunctionDeclaration node
      • AFunctionDeclaration

        public AFunctionDeclaration()
        Creates a new default constructor AFunctionDeclaration node with no children.
    • Method Detail

      • removeChild

        public void removeChild​(org.intocps.maestro.ast.node.INode child)
        Removes the INode child as a child of this AFunctionDeclaration node. Do not call this method with any graph fields of this node. This will cause any child's with the same reference to be removed unintentionally or RuntimeExceptionwill be thrown.
        Specified by:
        removeChild in interface org.intocps.maestro.ast.node.INode
        Specified by:
        removeChild in interface PDeclaration
        Overrides:
        removeChild in class PDeclarationBase
        Parameters:
        child - the child node to be removed from this AFunctionDeclaration node
        Throws:
        java.lang.RuntimeException - if child is not a child of this AFunctionDeclaration node
      • getChildren

        public java.util.Map<java.lang.String,​java.lang.Object> getChildren​(java.lang.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
      • equals

        public boolean equals​(java.lang.Object o)
        Essentially this.toString().equals(o.toString()).
        Specified by:
        equals in interface PDeclaration
        Overrides:
        equals in class PDeclarationBase
      • clone

        public AFunctionDeclaration clone​(java.util.Map<org.intocps.maestro.ast.node.INode,​org.intocps.maestro.ast.node.INode> oldToNewMap)
        Creates a deep clone of this AFunctionDeclaration 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 AFunctionDeclaration node
      • setReturnType

        public void setReturnType​(org.intocps.maestro.ast.node.PType value)
        Sets the _returnType child of this AFunctionDeclaration node.
        Parameters:
        value - the new _returnType child of this AFunctionDeclaration node
      • getReturnType

        public org.intocps.maestro.ast.node.PType getReturnType()
        Returns:
        the PType node which is the _returnType child of this AFunctionDeclaration node
      • setFormals

        public void setFormals​(java.util.List<? extends org.intocps.maestro.ast.node.AFormalParameter> value)
        Sets the _formals child of this AFunctionDeclaration node.
        Parameters:
        value - the new _formals child of this AFunctionDeclaration node
      • getFormals

        public java.util.LinkedList<org.intocps.maestro.ast.node.AFormalParameter> getFormals()
        Returns:
        the LinkedList node which is the _formals child of this AFunctionDeclaration node
      • apply

        public void apply​(org.intocps.maestro.ast.analysis.intf.IAnalysis caller)
                   throws org.intocps.maestro.ast.analysis.AnalysisException
        Calls the IAnalysis.caseAFunctionDeclaration(AFunctionDeclaration) 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 AFunctionDeclaration 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.caseAFunctionDeclaration(AFunctionDeclaration) 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 AFunctionDeclaration 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.caseAFunctionDeclaration(AFunctionDeclaration, 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 AFunctionDeclaration 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.caseAFunctionDeclaration(AFunctionDeclaration, 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 AFunctionDeclaration node is applied
        question - the question provided to caller
        Returns:
        the answer as returned from answer
        Throws:
        org.intocps.maestro.ast.analysis.AnalysisException