|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.babel.symbols.ASTNode
gov.llnl.babel.symbols.Symbol
The Symbol
abstract base class describes the basic
characteristics shared by all symbols in the symbol table. All
SIDL symbols have a symbol identifier, a symbol type, a metadata
description, and an associated comment. Four different types of
symbols are supported: package, enum, class, and interface.
Field Summary | |
static int |
CLASS
|
static int |
ENUM
|
static int |
INTERFACE
|
static int |
PACKAGE
|
static java.lang.String[] |
s_type
|
static java.lang.String |
SCOPE
|
Constructor Summary | |
Symbol(SymbolID id,
int type,
Comment comment)
Initialize the Symbol abstact base class by providing
a symbol identifier and its type (one of CLASS, ENUM, INTERFACE, or
PACKAGE). |
|
Symbol(SymbolID id,
int type,
Comment comment,
Metadata metadata)
Initialize the Symbol abstract base class by providing
a symbol identifier, a symbol type, a comment, and a metadata object. |
Method Summary | |
void |
addMetadata(java.lang.String keyword,
java.lang.String value)
Add a (keyword,value) pair to the metadata for this symbol. |
int |
compareTo(java.lang.Object o)
Compare this Symbol with the argument passed in. |
abstract java.util.Set |
getAllSymbolReferences()
Return the symbol references for the whole type hierarchy rooted with this symbol. |
abstract java.util.Set |
getBasicArrayRefs()
Return the set of all references to arrays of fundamental types. |
Comment |
getComment()
Return the comment associated with this symbol. |
java.lang.String |
getFullName()
Return the fully qualified name associated with this symbol. |
Metadata |
getMetadata()
Return the metadata associated with this symbol. |
SymbolID |
getSymbolID()
Return the identifier associated with this symbol. |
abstract java.util.Set |
getSymbolReferences()
Return the set of symbols (in the form of SymbolID )
referenced by this particular symbol. |
int |
getSymbolType()
Return the type of this symbol, one of CLASS, ENUM, INTERFACE, or PACKAGE. |
java.lang.String |
getSymbolTypeString()
Return the type string associated with this symbol. |
boolean |
getUserSpecified()
Indicate whether this is a user-specified symbol (or one resulting from dependency resolution) |
boolean |
isInterface()
Return TRUE if the type of this symbol is an interface; otherwise, return FALSE. |
boolean |
isPackage()
Return TRUE if the symbol is a package; otherwise, return FALSE. |
void |
setComment(Comment comment)
Alter the comment. |
void |
setUserSpecified(boolean val)
Specify whether this symbol was given by the user on the Babel command line |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int ENUM
public static final int CLASS
public static final int INTERFACE
public static final int PACKAGE
public static final java.lang.String[] s_type
public static final java.lang.String SCOPE
Constructor Detail |
public Symbol(SymbolID id, int type, Comment comment)
Symbol
abstact base class by providing
a symbol identifier and its type (one of CLASS, ENUM, INTERFACE, or
PACKAGE). The metadata is constructed using the current date and time.
public Symbol(SymbolID id, int type, Comment comment, Metadata metadata)
Symbol
abstract base class by providing
a symbol identifier, a symbol type, a comment, and a metadata object.
Method Detail |
public Comment getComment()
public void setComment(Comment comment)
comment
- the new comment.public boolean getUserSpecified()
public void setUserSpecified(boolean val)
public Metadata getMetadata()
public void addMetadata(java.lang.String keyword, java.lang.String value)
public SymbolID getSymbolID()
public java.lang.String getFullName()
public int getSymbolType()
public boolean isPackage()
public boolean isInterface()
public java.lang.String getSymbolTypeString()
public abstract java.util.Set getSymbolReferences()
SymbolID
)
referenced by this particular symbol. The return argument may be
null if this symbol contains no external references.
public abstract java.util.Set getAllSymbolReferences()
public abstract java.util.Set getBasicArrayRefs()
public int compareTo(java.lang.Object o)
Symbol
with the argument passed in.
compareTo
in interface java.lang.Comparable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |