Package org.intocps.maestro.ast
Class AVariableDeclaration
- java.lang.Object
-
- org.intocps.maestro.ast.node.Node
-
- org.intocps.maestro.ast.PDeclarationBase
-
- org.intocps.maestro.ast.AVariableDeclaration
-
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<org.intocps.maestro.ast.node.INode>,org.intocps.maestro.ast.node.INode,PDeclaration
public class AVariableDeclaration extends PDeclarationBase
Generated file by AST Creator- Author:
- Kenneth Lausdahl
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.intocps.maestro.ast.PDeclarationBase
_name
-
-
Constructor Summary
Constructors Constructor Description AVariableDeclaration()Creates a new default constructorAVariableDeclarationnode with no children.AVariableDeclaration(LexIdentifier name_, 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 voidapply(org.intocps.maestro.ast.analysis.intf.IAnalysis caller)Calls theIAnalysis.caseAVariableDeclaration(AVariableDeclaration)of theIAnalysiscaller.<A> Aapply(org.intocps.maestro.ast.analysis.intf.IAnswer<A> caller)Calls theIAnswer.caseAVariableDeclaration(AVariableDeclaration)of theIAnswercaller.<Q> voidapply(org.intocps.maestro.ast.analysis.intf.IQuestion<Q> caller, Q question)Calls theIQuestion.caseAVariableDeclaration(AVariableDeclaration, Object)of theIQuestioncaller.<Q,A>
Aapply(org.intocps.maestro.ast.analysis.intf.IQuestionAnswer<Q,A> caller, Q question)Calls theIQuestionAnswer.caseAVariableDeclaration(AVariableDeclaration, Object)of theIQuestionAnswercaller.AVariableDeclarationclone()Returns a deep clone of thisAVariableDeclarationnode.AVariableDeclarationclone(Map<org.intocps.maestro.ast.node.INode,org.intocps.maestro.ast.node.INode> oldToNewMap)Creates a deep clone of thisAVariableDeclarationnode 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 valueorg.intocps.maestro.ast.node.PInitializergetInitializer()LinkedList<org.intocps.maestro.ast.node.PExp>getSize()org.intocps.maestro.ast.node.PTypegetType()inthashCode()Forwarding hashCode call toObject.hashCode().voidremoveChild(org.intocps.maestro.ast.node.INode child)voidsetInitializer(org.intocps.maestro.ast.node.PInitializer value)Sets the_initializerchild of thisAVariableDeclarationnode.voidsetSize(List<? extends org.intocps.maestro.ast.node.PExp> value)Sets the_sizechild of thisAVariableDeclarationnode.voidsetType(org.intocps.maestro.ast.node.PType value)Sets the_typechild of thisAVariableDeclarationnode.StringtoString()-
Methods inherited from class org.intocps.maestro.ast.PDeclarationBase
getName, setName
-
Methods inherited from class org.intocps.maestro.ast.node.Node
cloneList, cloneList, cloneListExternal, cloneListExternal, cloneListList, cloneListList, cloneNode, cloneNode, compareTo, getAllFields, getAncestor, parent, parent, replaceChild
-
-
-
-
Constructor Detail
-
AVariableDeclaration
public AVariableDeclaration()
Creates a new default constructorAVariableDeclarationnode with no children.
-
AVariableDeclaration
public AVariableDeclaration(LexIdentifier name_, 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 constructorAVariableDeclarationnode with the given nodes as children.- Parameters:
type_- thePTypenode for thetypechild of thisAVariableDeclarationnodesize_- theNodeListnode for thesizechild of thisAVariableDeclarationnodeinitializer_- thePInitializernode for theinitializerchild of thisAVariableDeclarationnode
-
-
Method Detail
-
toString
public String toString()
- Specified by:
toStringin interfacePDeclaration- Overrides:
toStringin classPDeclarationBase
-
equals
public boolean equals(Object o)
Essentially this.toString().equals(o.toString()).- Specified by:
equalsin interfacePDeclaration- Overrides:
equalsin classPDeclarationBase
-
hashCode
public int hashCode()
Forwarding hashCode call toObject.hashCode().- Specified by:
hashCodein interfacePDeclaration- Overrides:
hashCodein classPDeclarationBase
-
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 classPDeclarationBase- Parameters:
includeInheritedFields- if true all inherited fields are included- Returns:
- a a map of names to values of all fields
-
clone
public AVariableDeclaration clone()
Returns a deep clone of thisAVariableDeclarationnode.- Specified by:
clonein interfaceorg.intocps.maestro.ast.node.INode- Specified by:
clonein interfacePDeclaration- Specified by:
clonein classPDeclarationBase- Returns:
- a deep clone of this
AVariableDeclarationnode
-
removeChild
public void removeChild(org.intocps.maestro.ast.node.INode child)
Removes theINodechildas a child of thisAVariableDeclarationnode. 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- Overrides:
removeChildin classPDeclarationBase- Parameters:
child- the child node to be removed from thisAVariableDeclarationnode- Throws:
RuntimeException- ifchildis not a child of thisAVariableDeclarationnode
-
clone
public AVariableDeclaration clone(Map<org.intocps.maestro.ast.node.INode,org.intocps.maestro.ast.node.INode> oldToNewMap)
Creates a deep clone of thisAVariableDeclarationnode 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 classPDeclarationBase- Parameters:
oldToNewMap- the map filled with the old node-new node relation- Returns:
- a deep clone of this
AVariableDeclarationnode
-
setType
public void setType(org.intocps.maestro.ast.node.PType value)
Sets the_typechild of thisAVariableDeclarationnode.- Parameters:
value- the new_typechild of thisAVariableDeclarationnode
-
getType
public org.intocps.maestro.ast.node.PType getType()
- Returns:
- the
PTypenode which is the_typechild of thisAVariableDeclarationnode
-
setSize
public void setSize(List<? extends org.intocps.maestro.ast.node.PExp> value)
Sets the_sizechild of thisAVariableDeclarationnode.- Parameters:
value- the new_sizechild of thisAVariableDeclarationnode
-
getSize
public LinkedList<org.intocps.maestro.ast.node.PExp> getSize()
- Returns:
- the
LinkedListnode which is the_sizechild of thisAVariableDeclarationnode
-
setInitializer
public void setInitializer(org.intocps.maestro.ast.node.PInitializer value)
Sets the_initializerchild of thisAVariableDeclarationnode.- Parameters:
value- the new_initializerchild of thisAVariableDeclarationnode
-
getInitializer
public org.intocps.maestro.ast.node.PInitializer getInitializer()
- Returns:
- the
PInitializernode which is the_initializerchild of thisAVariableDeclarationnode
-
apply
public void apply(org.intocps.maestro.ast.analysis.intf.IAnalysis caller) throws org.intocps.maestro.ast.analysis.AnalysisExceptionCalls theIAnalysis.caseAVariableDeclaration(AVariableDeclaration)of theIAnalysiscaller.- Specified by:
applyin interfaceorg.intocps.maestro.ast.node.INode- Specified by:
applyin classorg.intocps.maestro.ast.node.Node- Parameters:
caller- theIAnalysisto which thisAVariableDeclarationnode 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.AnalysisExceptionCalls theIAnswer.caseAVariableDeclaration(AVariableDeclaration)of theIAnswercaller.- Specified by:
applyin interfaceorg.intocps.maestro.ast.node.INode- Specified by:
applyin classorg.intocps.maestro.ast.node.Node- Parameters:
caller- theIAnswerto which thisAVariableDeclarationnode 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.AnalysisExceptionCalls theIQuestion.caseAVariableDeclaration(AVariableDeclaration, Object)of theIQuestioncaller.- Specified by:
applyin interfaceorg.intocps.maestro.ast.node.INode- Specified by:
applyin classorg.intocps.maestro.ast.node.Node- Parameters:
caller- theIQuestionto which thisAVariableDeclarationnode is appliedquestion- the question provided tocaller- 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.AnalysisExceptionCalls theIQuestionAnswer.caseAVariableDeclaration(AVariableDeclaration, Object)of theIQuestionAnswercaller.- Specified by:
applyin interfaceorg.intocps.maestro.ast.node.INode- Specified by:
applyin classorg.intocps.maestro.ast.node.Node- Parameters:
caller- theIQuestionAnswerto which thisAVariableDeclarationnode is appliedquestion- the question provided tocaller- Returns:
- the answer as returned from
answer - Throws:
org.intocps.maestro.ast.analysis.AnalysisException
-
-