Class PDeclarationBase

java.lang.Object
org.intocps.maestro.ast.node.Node
org.intocps.maestro.ast.PDeclarationBase
All Implemented Interfaces:
Serializable, Cloneable, Comparable<org.intocps.maestro.ast.node.INode>, org.intocps.maestro.ast.node.INode, PDeclaration
Direct Known Subclasses:
AFunctionDeclaration, AModuleDeclaration, AVariableDeclaration

public abstract class PDeclarationBase extends org.intocps.maestro.ast.node.Node implements PDeclaration
Generated file by AST Creator
Author:
Kenneth Lausdahl
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected LexIdentifier
     

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

    _visitedNodes
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new default constructor PDeclarationBase node with no children.
    Deprecated.
    This method should not be used, use AstFactory instead.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract PDeclaration
    Returns a deep clone of this PDeclarationBase node.
    abstract PDeclaration
    clone(Map<org.intocps.maestro.ast.node.INode,org.intocps.maestro.ast.node.INode> oldToNewMap)
    Creates a deep clone of this PDeclarationBase node while putting all old node-new node relations in the map oldToNewMap.
    boolean
    Essentially this.toString().equals(o.toString()).
    getChildren(Boolean includeInheritedFields)
    Creates a map of all field names and their value
     
    int
    Forwarding hashCode call to Object.hashCode().
    void
    removeChild(org.intocps.maestro.ast.node.INode child)
    Removes the INode child as a child of this PDeclarationBase node.
    void
    Sets the _name child of this PDeclarationBase node.
     

    Methods inherited from class org.intocps.maestro.ast.node.Node

    apply, apply, apply, apply, 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

    apply, apply, apply, apply, getAncestor, parent, parent, replaceChild
  • Field Details

  • Constructor Details

    • PDeclarationBase

      public PDeclarationBase(LexIdentifier name_)
      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 PDeclarationBase node with the given nodes as children.
      Parameters:
      name_ - the LexIdentifier node for the name child of this PDeclarationBase node
    • PDeclarationBase

      public PDeclarationBase()
      Creates a new default constructor PDeclarationBase node with no children.
  • Method Details

    • equals

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

      public abstract PDeclaration clone()
      Returns a deep clone of this PDeclarationBase node.
      Specified by:
      clone in interface org.intocps.maestro.ast.node.INode
      Specified by:
      clone in interface PDeclaration
      Specified by:
      clone in class org.intocps.maestro.ast.node.Node
      Returns:
      a deep clone of this PDeclarationBase node
    • toString

      public String toString()
      Specified by:
      toString in interface PDeclaration
      Overrides:
      toString in class Object
    • removeChild

      public void removeChild(org.intocps.maestro.ast.node.INode child)
      Removes the INode child as a child of this PDeclarationBase 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
      Specified by:
      removeChild in class org.intocps.maestro.ast.node.Node
      Parameters:
      child - the child node to be removed from this PDeclarationBase node
      Throws:
      RuntimeException - if child is not a child of this PDeclarationBase node
    • hashCode

      public int hashCode()
      Forwarding hashCode call to Object.hashCode().
      Specified by:
      hashCode in interface PDeclaration
      Overrides:
      hashCode in class Object
    • clone

      public abstract PDeclaration clone(Map<org.intocps.maestro.ast.node.INode,org.intocps.maestro.ast.node.INode> oldToNewMap)
      Creates a deep clone of this PDeclarationBase 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 org.intocps.maestro.ast.node.Node
      Parameters:
      oldToNewMap - the map filled with the old node-new node relation
      Returns:
      a deep clone of this PDeclarationBase node
    • 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 org.intocps.maestro.ast.node.Node
      Parameters:
      includeInheritedFields - if true all inherited fields are included
      Returns:
      a a map of names to values of all fields
    • setName

      public void setName(LexIdentifier value)
      Sets the _name child of this PDeclarationBase node.
      Specified by:
      setName in interface PDeclaration
      Parameters:
      value - the new _name child of this PDeclarationBase node
    • getName

      public LexIdentifier getName()
      Specified by:
      getName in interface PDeclaration
      Returns:
      the LexIdentifier node which is the _name child of this PDeclarationBase node