public class LinkageSpecification extends Declaration implements SymbolTable
| Constructor and Description |
|---|
LinkageSpecification(java.lang.String s,
Declaration decl)
Represents extern "s" decl.
|
LinkageSpecification(java.lang.String s,
java.util.List<Traversable> decl_list)
Represents extern "s" { decl_list }.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDeclaration(Declaration decl)
Add a declaration to the end of the set of declarations
and place the declared symbols in the symbol table.
|
void |
addDeclarationAfter(Declaration ref,
Declaration decl)
Add a declaration after the reference declaration.
|
void |
addDeclarationBefore(Declaration ref,
Declaration decl)
Add a declaration before the reference declaration.
|
boolean |
containsDeclaration(Declaration decl)
Checks if the symbol table contains the specified declaration.
|
boolean |
containsSymbol(Symbol symbol)
Checks if the symbol table contains the specified symbol.
|
static void |
defaultPrint(LinkageSpecification s,
java.io.PrintWriter o)
Prints a linkage specification block to a stream.
|
Declaration |
findSymbol(IDExpression name)
Retrieves the declaration for a symbol, possibly searching
through parent symbol tables.
|
java.util.Set<Declaration> |
getDeclarations()
Returns the set of declarations declared within the symbol table object.
|
java.util.List<IDExpression> |
getDeclaredIDs()
Returns a list of name ID introduced by this declaration.
|
java.util.List<SymbolTable> |
getParentTables()
Returns a list of symbol tables that are parents
of this table in the distributed symbol table graph.
|
java.util.Set<Symbol> |
getSymbols()
Returns the set of declared symbols in the symbol table object.
|
static void |
setClassPrintMethod(java.lang.reflect.Method m)
Overrides the class print method, so that all subsequently
created objects will use the supplied method.
|
annotate, annotateAfter, annotateBefore, clone, containsAnnotation, detach, equals, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getChildren, getParent, hashCode, print, removeAnnotations, removeAnnotations, removeChild, setChild, setParent, setPrintMethod, setSemiColon, toString, verifygetChildren, getParent, removeChild, setChild, setParentpublic LinkageSpecification(java.lang.String s,
Declaration decl)
s - The name of the other language.decl - The declaration whose linkage is being specified.public LinkageSpecification(java.lang.String s,
java.util.List<Traversable> decl_list)
s - The name of the other language.decl_list - The declaration whose linkage is being specified.public void addDeclaration(Declaration decl)
SymbolTableaddDeclaration in interface SymbolTabledecl - The declaration to add.public void addDeclarationBefore(Declaration ref, Declaration decl)
SymbolTableaddDeclarationBefore in interface SymbolTableref - The reference point.decl - The declaration to add.public void addDeclarationAfter(Declaration ref, Declaration decl)
SymbolTableaddDeclarationAfter in interface SymbolTableref - The reference point.decl - The declaration to add.public static void defaultPrint(LinkageSpecification s, java.io.PrintWriter o)
s - The block to print.o - The writer on which to print the block.public Declaration findSymbol(IDExpression name)
SymbolTablefindSymbol in interface SymbolTablename - The name of the symbol.public java.util.List<IDExpression> getDeclaredIDs()
DeclarationgetDeclaredIDs in class Declarationpublic java.util.List<SymbolTable> getParentTables()
SymbolTablegetParentTables in interface SymbolTablepublic static void setClassPrintMethod(java.lang.reflect.Method m)
m - The new print method.public java.util.Set<Symbol> getSymbols()
SymbolTablegetSymbols in interface SymbolTablepublic java.util.Set<Declaration> getDeclarations()
SymbolTablegetDeclarations in interface SymbolTablepublic boolean containsSymbol(Symbol symbol)
SymbolTablecontainsSymbol in interface SymbolTablepublic boolean containsDeclaration(Declaration decl)
SymbolTablecontainsDeclaration in interface SymbolTable