gov.llnl.babel.symbols
Class Struct
java.lang.Object
gov.llnl.babel.symbols.ASTNode
gov.llnl.babel.symbols.Symbol
gov.llnl.babel.symbols.Struct
- All Implemented Interfaces:
- Attributes, java.lang.Comparable, IMetadata
- public class Struct
- extends Symbol
The Struct
contains a list of named types.
Methods inherited from class gov.llnl.babel.symbols.Symbol |
addMetadata, compareTo, getAttribute, getAttributes, getComment, getDepth, getFullName, getMetadata, getSymbolID, getSymbolType, getSymbolTypeString, getUserSpecified, hasAttribute, isInterface, isPackage, minimumDepth, removeAttribute, setAttribute, setAttribute, setComment, setUserSpecified |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Struct
public Struct(SymbolID id,
Comment comment)
Struct
public Struct(SymbolID id,
Comment comment,
Metadata metadata)
getSymbolReferences
public java.util.Set getSymbolReferences()
- Description copied from class:
Symbol
- Return the set of symbols (in the form of
SymbolID
)
referenced by this particular symbol. The return argument may be
null if this symbol contains no external references.
- Specified by:
getSymbolReferences
in class Symbol
getAllSymbolReferences
public java.util.Set getAllSymbolReferences()
- Description copied from class:
Symbol
- Return the symbol references for the whole type hierarchy rooted
with this symbol. For packages, this recurses down the package
hierarchy.
- Specified by:
getAllSymbolReferences
in class Symbol
getBasicArrayRefs
public java.util.Set getBasicArrayRefs()
- Description copied from class:
Symbol
- Return the set of all references to arrays of fundamental types.
- Specified by:
getBasicArrayRefs
in class Symbol
getItems
public java.util.List getItems()
- Returns:
- ordered list of items. Each element is an
Struct.Item
.
addItem
public int addItem(Struct.Item i)
hasArrayReference
public boolean hasArrayReference()
addItem
public int addItem(java.lang.String name,
Type type)
- Insert a new type and name into the struct
- Returns:
- new number of items in the struct