gov.llnl.babel.ast
Class Package

java.lang.Object
  extended by gov.llnl.babel.ast.ASTNode
      extended by gov.llnl.babel.ast.Type
          extended by gov.llnl.babel.ast.NamedType
              extended by gov.llnl.babel.ast.Package
All Implemented Interfaces:
IAttributable, INameable

public class Package
extends NamedType
implements IAttributable

The only NamedType that contains other types.


Field Summary
protected  AttributeList d_attribList
          the list of attributes (modifiers)
protected  java.util.LinkedList d_types
          a list of NamedTypes
 
Fields inherited from class gov.llnl.babel.ast.NamedType
d_comment, d_name, d_version
 
Fields inherited from class gov.llnl.babel.ast.ASTNode
ILLEGAL_NODEID
 
Constructor Summary
Package()
           
Package(ParseTreeNode src, ASTNode parent, Name name, Version version)
           
 
Method Summary
 java.lang.Object accept(Visitor v, java.lang.Object data)
          implements "Visitor Pattern"
 void appendNamedType(NamedType type)
           
 AttributeList getAttributeList()
           
 java.util.List getNamedTypes()
           
 java.lang.String getTypeName()
           
 void setAttributeList(AttributeList attrib)
           
 
Methods inherited from class gov.llnl.babel.ast.NamedType
getDocComment, getFQN, getName, getUserSelected, getVersion, hasDocComment, setDocComment, setName, setUserSelected, setVersion
 
Methods inherited from class gov.llnl.babel.ast.ASTNode
getFilename, getFirstToken, getLastToken, getNodeId, getParent, getParseTreeNode, getSymbolTableEntry, setFirstToken, setLastToken, setNodeId, setParent, setParseTreeNode, setSymbolTableEntry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

d_types

protected java.util.LinkedList d_types
a list of NamedTypes


d_attribList

protected AttributeList d_attribList
the list of attributes (modifiers)

Constructor Detail

Package

public Package()

Package

public Package(ParseTreeNode src,
               ASTNode parent,
               Name name,
               Version version)
Method Detail

getTypeName

public java.lang.String getTypeName()
Specified by:
getTypeName in class Type

getNamedTypes

public java.util.List getNamedTypes()

appendNamedType

public void appendNamedType(NamedType type)

getAttributeList

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

setAttributeList

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

accept

public java.lang.Object accept(Visitor v,
                               java.lang.Object data)
Description copied from class: ASTNode
implements "Visitor Pattern"

Specified by:
accept in class ASTNode
Parameters:
v - The visitor class
data - Optional extra data
Returns:
Optional extra data