Package com.sun.tools.corba.ee.idl
Class SymtabEntry
- java.lang.Object
-
- com.sun.tools.corba.ee.idl.SymtabEntry
-
- Direct Known Subclasses:
ConstEntry,EnumEntry,ForwardEntry,IncludeEntry,InterfaceEntry,MethodEntry,ModuleEntry,NativeEntry,ParameterEntry,PragmaEntry,PrimitiveEntry,SequenceEntry,StringEntry,StructEntry,TypedefEntry,UnionEntry
public class SymtabEntry extends java.lang.ObjectThis is the base class for all symbol table entries.
-
-
Field Summary
Fields Modifier and Type Field Description private Comment_commentprivate SymtabEntry_containerprivate java.util.Vector<java.lang.Object>_dynamicVarsprivate boolean_emitprivate java.lang.Object_infoprivate boolean_isReferencableprivate java.lang.String_moduleprivate java.lang.String_nameprivate RepositoryID_repIDprivate IncludeEntry_sourceFileprivate SymtabEntry_typeprivate java.lang.String_typeName(package private) static java.util.Stack<java.lang.Boolean>includeStack(package private) static intmaxKey(package private) static booleansetEmit
-
Constructor Summary
Constructors Constructor Description SymtabEntry()SymtabEntry(SymtabEntry that)This is a shallow copy constructorSymtabEntry(SymtabEntry that, IDLID clone)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()This is a shallow copy cloneCommentcomment()voidcomment(Comment comment)SymtabEntrycontainer()This must be either an InterfaceEntry or a ModuleEntry.voidcontainer(SymtabEntry newContainer)This must be either an InterfaceEntry or a ModuleEntry.java.lang.ObjectdynamicVariable(int key)Other variables besides the default ones can be dynamically placed into SymTabEntry (and therefore on all symbol table entries) by extenders.voiddynamicVariable(int key, java.lang.Object value)Other variables besides the default ones can be dynamically placed into SymTabEntry (and therefore on all symbol table entries) by extenders.booleanemit()Should this type be emitted?voidemit(boolean emit)(package private) static voidenteringInclude()(package private) static voidexitingInclude()java.lang.StringfullName()voidgenerate(java.util.Hashtable symbolTable, java.io.PrintWriter stream)Invoke a generator.Generatorgenerator()Access a generator.static intgetVariableKey()Other variables besides the default ones can be dynamically placed into SymTabEntry (and therefore on all symbol table entries) by extenders.(package private) voidgrowVars()(package private) voidinitDynamicVars()booleanisReferencable()voidisReferencable(boolean value)java.lang.Stringmodule()Get the name of this entry's module.voidmodule(java.lang.String newName)Set the module for this entry.java.lang.Stringname()voidname(java.lang.String newName)Set the name.RepositoryIDrepositoryID()voidrepositoryID(RepositoryID id)Set the repository ID for this entry.IncludeEntrysourceFile()The file name in which this entry was defined.voidsourceFile(IncludeEntry file)The file name in which this entry was defined.SymtabEntrytype()voidtype(SymtabEntry newType)java.lang.StringtypeName()protected voidtypeName(java.lang.String typeName)
-
-
-
Field Detail
-
includeStack
static java.util.Stack<java.lang.Boolean> includeStack
-
setEmit
static boolean setEmit
-
maxKey
static int maxKey
-
_container
private SymtabEntry _container
-
_module
private java.lang.String _module
-
_name
private java.lang.String _name
-
_typeName
private java.lang.String _typeName
-
_type
private SymtabEntry _type
-
_sourceFile
private IncludeEntry _sourceFile
-
_info
private java.lang.Object _info
-
_repID
private RepositoryID _repID
-
_emit
private boolean _emit
-
_comment
private Comment _comment
-
_dynamicVars
private java.util.Vector<java.lang.Object> _dynamicVars
-
_isReferencable
private boolean _isReferencable
-
-
Constructor Detail
-
SymtabEntry
public SymtabEntry()
-
SymtabEntry
SymtabEntry(SymtabEntry that, IDLID clone)
-
SymtabEntry
SymtabEntry(SymtabEntry that)
This is a shallow copy constructor- Parameters:
that- SymtabEntry to copy
-
-
Method Detail
-
initDynamicVars
void initDynamicVars()
-
clone
public java.lang.Object clone()
This is a shallow copy clone- Overrides:
clonein classjava.lang.Object
-
fullName
public final java.lang.String fullName()
- Returns:
- the concatenation of the module and the name, delimited by '/'.
-
module
public java.lang.String module()
Get the name of this entry's module. If there are modules within modules, each module name is separated by '/'.- Returns:
- this entry's module name.
-
module
public void module(java.lang.String newName)
Set the module for this entry.- Parameters:
newName- the new name of the module.
-
name
public java.lang.String name()
- Returns:
- the name of this entry.
-
name
public void name(java.lang.String newName)
Set the name.- Parameters:
newName- the new name.
-
typeName
public java.lang.String typeName()
- Returns:
- the type name of this entry.
-
typeName
protected void typeName(java.lang.String typeName)
-
type
public SymtabEntry type()
- Returns:
- the type entry of this entry
-
type
public void type(SymtabEntry newType)
-
sourceFile
public IncludeEntry sourceFile()
The file name in which this entry was defined.- Returns:
IncludeEntryof fileName
-
sourceFile
public void sourceFile(IncludeEntry file)
The file name in which this entry was defined.- Parameters:
file-IncludeEntryof the file
-
container
public SymtabEntry container()
This must be either an InterfaceEntry or a ModuleEntry. It can be nothing else.- Returns:
- container of the entry
-
container
public void container(SymtabEntry newContainer)
This must be either an InterfaceEntry or a ModuleEntry. It can be nothing else.- Parameters:
newContainer-InterfaceEntryorModuleEntry
-
repositoryID
public RepositoryID repositoryID()
- Returns:
- the repository ID for this entry.
-
repositoryID
public void repositoryID(RepositoryID id)
Set the repository ID for this entry.- Parameters:
id- the new repository ID.
-
emit
public boolean emit()
Should this type be emitted?- Returns:
- true if this type is emitted and referencable
-
emit
public void emit(boolean emit)
-
comment
public Comment comment()
-
comment
public void comment(Comment comment)
-
isReferencable
public boolean isReferencable()
-
isReferencable
public void isReferencable(boolean value)
-
enteringInclude
static void enteringInclude()
-
exitingInclude
static void exitingInclude()
-
getVariableKey
public static int getVariableKey()
Other variables besides the default ones can be dynamically placed into SymTabEntry (and therefore on all symbol table entries) by extenders. Before such a variable can exist, its key must be obtained by calling getVariableKey.- Returns:
- the key for placing variables into the entry
-
dynamicVariable
public void dynamicVariable(int key, java.lang.Object value) throws java.lang.NoSuchFieldExceptionOther variables besides the default ones can be dynamically placed into SymTabEntry (and therefore on all symbol table entries) by extenders. This method assigns the value to the variable of the given key. A valid key must be obtained by calling the method getVariableKey. If the key is invalid, NoSuchFieldException is thrown.- Parameters:
key- obtained bygetVariableKey()value- variable to assign to key- Throws:
java.lang.NoSuchFieldException- if key is invalid
-
dynamicVariable
public java.lang.Object dynamicVariable(int key) throws java.lang.NoSuchFieldExceptionOther variables besides the default ones can be dynamically placed into SymTabEntry (and therefore on all symbol table entries) by extenders. This method gets the value of the variable of the given key. A valid key must be obtained by calling the method getVariableKey. If the key is invalid,NoSuchFieldExceptionis thrown.- Parameters:
key- obtained by callinggetVariableKey()- Returns:
- the variable for the key
- Throws:
java.lang.NoSuchFieldException- if key is invalid
-
growVars
void growVars()
-
generate
public void generate(java.util.Hashtable symbolTable, java.io.PrintWriter stream)Invoke a generator. A call to this method is only meaningful for subclasses of SymtabEntry. If called on this class, it is a no-op.- Parameters:
symbolTable- the symbol table is a hash table whose key is a fully qualified type name and whose value is a SymtabEntry or a subclass of SymtabEntry.stream- the stream to which the generator should sent its output.
-
generator
public Generator generator()
Access a generator. A call to this method is only meaningful for subclasses of SymtabEntry. If called on this class, it is a no-op.- Returns:
- an object which implements the Generator interface.
-
-