gov.llnl.babel.ast

Class Method

Implemented Interfaces:
IAttributable, INameable, INameableStruct

public class Method
extends ASTNode
implements INameable, IAttributable, INameableStruct

Has a name, inheritance hierarchy, return type, argument list, exception list, and is embedded in a Class or Interface NOTE: In this case, name is special in that name may be fullName, shortName, extension, etc. by default, name == fullName since this is what is subject to collision detection.

Field Summary

protected ArgumentList
d_argList
protected AttributeList
d_attribList
protected DocComment
d_comment
protected Ensures
d_ensures
protected FromClause
d_from
protected MethodName
d_name
protected Name
d_name2
protected Requires
d_requires
protected Type
d_returnType
protected SplicerList
d_splicers
protected ThrowsList
d_throwsList

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

ILLEGAL_NODEID

Constructor Summary

Method()
Method(ParseTreeNode src, ASTNode parent)

Method Summary

Object
accept(Visitor v, Object data)
implements "Visitor Pattern"
void
addSplicerBlock(SplicerBlock block)
ArgumentList
getArgumentList()
AttributeList
getAttributeList()
DocComment
getDocComment()
Ensures
getEnsures()
FromClause
getFromClause()
MethodName
getMethodName()
Name
getName()
Name
getName2()
Requires
getRequires()
Type
getReturnType()
SplicerList
getSplicerList()
ThrowsList
getThrowsList()
boolean
hasDocComment()
boolean
isRenamedFromAncestor()
void
setArgumentList(ArgumentList argList)
void
setAttributeList(AttributeList attrib)
void
setDocComment(String text)
void
setEnsures(Ensures ensures)
void
setFromClause(FromClause from)
void
setMethodName(MethodName name)
void
setName(Name name)
void
setName2(Name name2)
void
setRequires(Requires requires)
void
setReturnType(Type t)
void
setThrowsList(ThrowsList throwsList)

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_argList

protected ArgumentList d_argList

d_attribList

protected AttributeList d_attribList

d_comment

protected DocComment d_comment

d_ensures

protected Ensures d_ensures

d_from

protected FromClause d_from

d_name

protected MethodName d_name

d_name2

protected Name d_name2

d_requires

protected Requires d_requires

d_returnType

protected Type d_returnType

d_splicers

protected SplicerList d_splicers

d_throwsList

protected ThrowsList d_throwsList

Constructor Details

Method

public Method()

Method

public Method(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

addSplicerBlock

public void addSplicerBlock(SplicerBlock block)

getArgumentList

public ArgumentList getArgumentList()

getAttributeList

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

getDocComment

public DocComment getDocComment()

getEnsures

public Ensures getEnsures()

getFromClause

public FromClause getFromClause()

getMethodName

public MethodName getMethodName()

getName

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

getName2

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

getRequires

public Requires getRequires()

getReturnType

public Type getReturnType()

getSplicerList

public SplicerList getSplicerList()

getThrowsList

public ThrowsList getThrowsList()

hasDocComment

public boolean hasDocComment()

isRenamedFromAncestor

public boolean isRenamedFromAncestor()

setArgumentList

public void setArgumentList(ArgumentList argList)

setAttributeList

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

setDocComment

public void setDocComment(String text)

setEnsures

public void setEnsures(Ensures ensures)

setFromClause

public void setFromClause(FromClause from)

setMethodName

public void setMethodName(MethodName name)

setName

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

setName2

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

setRequires

public void setRequires(Requires requires)

setReturnType

public void setReturnType(Type t)

setThrowsList

public void setThrowsList(ThrowsList throwsList)