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 Object
This is the base class for all symbol table entries.
See Also:
  • Field Details

    • includeStack

      static Stack<Boolean> includeStack
    • setEmit

      static boolean setEmit
    • maxKey

      static int maxKey
    • _container

      private SymtabEntry _container
    • _module

      private String _module
    • _name

      private String _name
    • _typeName

      private String _typeName
    • _type

      private SymtabEntry _type
    • _sourceFile

      private IncludeEntry _sourceFile
    • _info

      private Object _info
    • _repID

      private RepositoryID _repID
    • _emit

      private boolean _emit
    • _comment

      private Comment _comment
    • _dynamicVars

      private Vector<Object> _dynamicVars
    • _isReferencable

      private boolean _isReferencable
  • Constructor Details

    • 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 Details

    • initDynamicVars

      void initDynamicVars()
    • clone

      public Object clone()
      This is a shallow copy clone
      Overrides:
      clone in class Object
    • fullName

      public final String fullName()
      Returns:
      the concatenation of the module and the name, delimited by '/'.
    • module

      public 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(String newName)
      Set the module for this entry.
      Parameters:
      newName - the new name of the module.
    • name

      public String name()
      Returns:
      the name of this entry.
    • name

      public void name(String newName)
      Set the name.
      Parameters:
      newName - the new name.
    • typeName

      public String typeName()
      Returns:
      the type name of this entry.
    • typeName

      protected void typeName(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:
      IncludeEntry of fileName
    • sourceFile

      public void sourceFile(IncludeEntry file)
      The file name in which this entry was defined.
      Parameters:
      file - IncludeEntry of 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 - InterfaceEntry or ModuleEntry
    • 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, Object value) throws NoSuchFieldException
      Other 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 by getVariableKey()
      value - variable to assign to key
      Throws:
      NoSuchFieldException - if key is invalid
    • dynamicVariable

      public Object dynamicVariable(int key) throws NoSuchFieldException
      Other 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, NoSuchFieldException is thrown.
      Parameters:
      key - obtained by calling getVariableKey()
      Returns:
      the variable for the key
      Throws:
      NoSuchFieldException - if key is invalid
    • growVars

      void growVars()
    • generate

      public void generate(Hashtable symbolTable, 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.