gov.llnl.babel.ast

Class Argument

Implemented Interfaces:
IAttributable, INameable, INameableStruct

public class Argument
extends ASTNode
implements INameable, IAttributable, INameableStruct

Unit of transfer in a method, holding the doccomment, attributes, mode, type, and variable name.

Field Summary

protected AttributeList
d_attribList
protected DocComment
d_comment
protected String
d_mode
protected Name
d_name
protected Name
d_name2
protected Type
d_type

Fields inherited from class gov.llnl.babel.ast.ASTNode

ILLEGAL_NODEID

Constructor Summary

Argument(ParseTreeNode src, ASTNode parent)

Method Summary

Object
accept(Visitor v, Object data)
implements "Visitor Pattern"
AttributeList
getAttributeList()
DocComment
getDocComment()
String
getMode()
Name
getName()
Name
getName2()
Type
getType()
boolean
hasDocComment()
void
setAttributeList(AttributeList attrib)
void
setDocComment(String text)
boolean
setMode(String mode)
void
setName(Name name)
void
setName2(Name name2)
void
setType(Type type)

Methods inherited from class gov.llnl.babel.ast.ASTNode

accept, getFilename, getFirstToken, getLastToken, getNodeId, getParent, getParseTreeNode, getSymbolTableEntry, setFirstToken, setLastToken, setNodeId, setParent, setParseTreeNode, setSymbolTableEntry

Field Details

d_attribList

protected AttributeList d_attribList

d_comment

protected DocComment d_comment

d_mode

protected String d_mode

d_name

protected Name d_name

d_name2

protected Name d_name2

d_type

protected Type d_type

Constructor Details

Argument

public Argument(ParseTreeNode src,
                ASTNode parent)
Parameters:
src - the ParseTreeNode useful for debugging (or null) for generated code
parent - the parent ASTNode.

Method Details

accept

public Object accept(Visitor v,
                     Object data)
implements "Visitor Pattern"
Overrides:
accept in interface ASTNode
Parameters:
v - The visitor class
data - Optional extra data
Returns:
Optional extra data

getAttributeList

public AttributeList getAttributeList()
Specified by:
getAttributeList in interface IAttributable

getDocComment

public DocComment getDocComment()

getMode

public String getMode()

getName

public Name getName()
Specified by:
getName in interface INameable

getName2

public Name getName2()
Specified by:
getName2 in interface INameableStruct

getType

public Type getType()

hasDocComment

public boolean hasDocComment()

setAttributeList

public void setAttributeList(AttributeList attrib)
Specified by:
setAttributeList in interface IAttributable

setDocComment

public void setDocComment(String text)

setMode

public boolean setMode(String mode)

setName

public void setName(Name name)
Specified by:
setName in interface INameable

setName2

public void setName2(Name name2)
Specified by:
setName2 in interface INameableStruct

setType

public void setType(Type type)