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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected LexIdentifier_name
-
Constructor Summary
Constructors Constructor Description PDeclarationBase()Creates a new default constructorPDeclarationBasenode with no children.PDeclarationBase(LexIdentifier name_)Deprecated.This method should not be used, use AstFactory instead.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract PDeclarationclone()Returns a deep clone of thisPDeclarationBasenode.abstract PDeclarationclone(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.booleanequals(Object o)Essentially this.toString().equals(o.toString()).Map<String,Object>getChildren(Boolean includeInheritedFields)Creates a map of all field names and their valueLexIdentifiergetName()inthashCode()Forwarding hashCode call toObject.hashCode().voidremoveChild(org.intocps.maestro.ast.node.INode child)voidsetName(LexIdentifier value)Sets the_namechild of thisPDeclarationBasenode.StringtoString()-
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
-
-
-
-
Field Detail
-
_name
protected LexIdentifier _name
-
-
Constructor Detail
-
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 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 Detail
-
hashCode
public int hashCode()
Forwarding hashCode call toObject.hashCode().- Specified by:
hashCodein interfacePDeclaration- Overrides:
hashCodein classObject
-
equals
public boolean equals(Object o)
Essentially this.toString().equals(o.toString()).- Specified by:
equalsin interfacePDeclaration- Overrides:
equalsin classObject
-
toString
public String toString()
- Specified by:
toStringin interfacePDeclaration- Overrides:
toStringin classObject
-
getChildren
public Map<String,Object> getChildren(Boolean includeInheritedFields)
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
-
clone
public abstract PDeclaration 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
-
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
-
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
-
setName
public void setName(LexIdentifier value)
Sets the_namechild of thisPDeclarationBasenode.- Specified by:
setNamein interfacePDeclaration- Parameters:
value- the new_namechild of thisPDeclarationBasenode
-
getName
public LexIdentifier getName()
- Specified by:
getNamein interfacePDeclaration- Returns:
- the
LexIdentifiernode which is the_namechild of thisPDeclarationBasenode
-
-