Class SymtabEntry

    • Field Detail

      • includeStack

        static java.util.Stack<java.lang.Boolean> includeStack
      • setEmit

        static boolean setEmit
      • maxKey

        static int maxKey
      • _module

        private java.lang.String _module
      • _name

        private java.lang.String _name
      • _typeName

        private java.lang.String _typeName
      • _info

        private java.lang.Object _info
      • _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)
        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:
        clone in class java.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
      • 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,
                                    java.lang.Object value)
                             throws java.lang.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:
        java.lang.NoSuchFieldException - if key is invalid
      • dynamicVariable

        public java.lang.Object dynamicVariable​(int key)
                                         throws java.lang.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:
        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.