Package org.intocps.maestro.ast
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
FieldsFields inherited from class org.intocps.maestro.ast.node.Node
_visitedNodes -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new default constructorPDeclarationBasenode with no children.PDeclarationBase(LexIdentifier name_) Deprecated.This method should not be used, use AstFactory instead. -
Method Summary
Modifier and TypeMethodDescriptionabstract PDeclarationclone()Returns a deep clone of thisPDeclarationBasenode.abstract PDeclarationCreates a deep clone of thisPDeclarationBasenode while putting all old node-new node relations in the mapoldToNewMap.booleanEssentially this.toString().equals(o.toString()).getChildren(Boolean includeInheritedFields) Creates a map of all field names and their valuegetName()inthashCode()Forwarding hashCode call toObject.hashCode().voidremoveChild(org.intocps.maestro.ast.node.INode child) voidsetName(LexIdentifier value) Sets the_namechild of thisPDeclarationBasenode.toString()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, replaceChildMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.intocps.maestro.ast.node.INode
apply, apply, apply, apply, getAncestor, parent, parent, replaceChild
-
Field Details
-
_name
-
-
Constructor Details
-
PDeclarationBase
Deprecated.This method should not be used, use AstFactory instead. The basic child nodes are removed from their previous parents.Creates a new complete constructorPDeclarationBasenode with the given nodes as children.- Parameters:
name_- theLexIdentifiernode for thenamechild of thisPDeclarationBasenode
-
PDeclarationBase
public PDeclarationBase()Creates a new default constructorPDeclarationBasenode with no children.
-
-
Method Details
-
clone
public abstract PDeclaration clone(Map<org.intocps.maestro.ast.node.INode, org.intocps.maestro.ast.node.INode> oldToNewMap) Creates a deep clone of thisPDeclarationBasenode while putting all old node-new node relations in the mapoldToNewMap.- Specified by:
clonein interfaceorg.intocps.maestro.ast.node.INode- Specified by:
clonein interfacePDeclaration- Specified by:
clonein classorg.intocps.maestro.ast.node.Node- Parameters:
oldToNewMap- the map filled with the old node-new node relation- Returns:
- a deep clone of this
PDeclarationBasenode
-
getChildren
Creates a map of all field names and their value- Specified by:
getChildrenin interfaceorg.intocps.maestro.ast.node.INode- Specified by:
getChildrenin interfacePDeclaration- Overrides:
getChildrenin classorg.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
-
toString
- Specified by:
toStringin interfacePDeclaration- Overrides:
toStringin classObject
-
hashCode
public int hashCode()Forwarding hashCode call toObject.hashCode().- Specified by:
hashCodein interfacePDeclaration- Overrides:
hashCodein classObject
-
removeChild
public void removeChild(org.intocps.maestro.ast.node.INode child) Removes theINodechildas a child of thisPDeclarationBasenode. 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 orRuntimeExceptionwill be thrown.- Specified by:
removeChildin interfaceorg.intocps.maestro.ast.node.INode- Specified by:
removeChildin interfacePDeclaration- Specified by:
removeChildin classorg.intocps.maestro.ast.node.Node- Parameters:
child- the child node to be removed from thisPDeclarationBasenode- Throws:
RuntimeException- ifchildis not a child of thisPDeclarationBasenode
-
clone
Returns a deep clone of thisPDeclarationBasenode.- Specified by:
clonein interfaceorg.intocps.maestro.ast.node.INode- Specified by:
clonein interfacePDeclaration- Specified by:
clonein classorg.intocps.maestro.ast.node.Node- Returns:
- a deep clone of this
PDeclarationBasenode
-
equals
Essentially this.toString().equals(o.toString()).- Specified by:
equalsin interfacePDeclaration- Overrides:
equalsin classObject
-
setName
Sets the_namechild of thisPDeclarationBasenode.- Specified by:
setNamein interfacePDeclaration- Parameters:
value- the new_namechild of thisPDeclarationBasenode
-
getName
- Specified by:
getNamein interfacePDeclaration- Returns:
- the
LexIdentifiernode which is the_namechild of thisPDeclarationBasenode
-