This stack provides an appropriate lookup mechanism for most names. This class identifies a line in a source file. It is used to store the location of definition for a class, interface, package, method or variable, and references to those constructs. Every Java construct stored in the symbol table is a Definition . This class provides a common base for all symbol definitions, and includes information such as an Occurrence to track the location where the symbol was defined, a list of references to the symbol and its name.
Some symbols can actually contain definitions of other symbols.
For example, a class can contain definitions for variables and even other classes. These types of symbols are grouped into a common base class called a ScopedDef . ScopedDef keeps a list of other constructs that were defined within it. ScopedDef objects are the objects that are stored in the scope Stack for name lookup. HasImports A further extension of a ScopedDef is one that HasImports .