dpt.symbtab
Class VariableDef

java.lang.Object
  |
  +--dpt.symbtab.Definition
        |
        +--dpt.symbtab.VariableDef

class VariableDef
extends Definition
implements TypedDef

Definition of a variable in a source file. This can be member data in class, a local variable or a method parameter.


Field Summary
private  java.util.Vector modifiers
           
private  Definition type
          The type of the variable
 
Fields inherited from class dpt.symbtab.Definition
definition, name, parentScope, references, ST_CL, ST_FU, ST_FU_EXT, ST_IF, ST_IMPL, ST_IMPORT, ST_PAC, ST_SUB, ST_SUPER, ST_VAR
 
Constructor Summary
(package private) VariableDef(java.lang.String name, Occurrence occ, ClassDef type, ScopedDef parentScope)
          Constructor to create a new variable symbol
(package private) VariableDef(java.lang.String name, Occurrence occ, ClassDef type, ScopedDef parentScope, java.util.Vector modifiers)
          Constructor to create a new variable symbol
 
Method Summary
 java.lang.String GetItem(int TypID)
           
 java.util.Vector GetItems(int TypID, java.lang.String modifier)
           
 java.lang.String GetLocation(int TypID, java.lang.String sName)
           
 Definition getType()
          get the type of the variable
 void report(IndentingPrintWriter out)
          Write information about this variable to the report
(package private)  void resolveTypes(SymbolTable symbolTable)
          Resolve referenced symbols used by this variable
 
Methods inherited from class dpt.symbtab.Definition
addReference, ExtractClass, ExtractClass, ExtractName, ExtractPackage, ExtractPackage, getDef, getName, getOccurrence, getParentScope, getQualifiedName, GetReferences, isSuperClassOf, listReferences, lookup, lookup, setParentScope, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

type

private Definition type
The type of the variable

modifiers

private java.util.Vector modifiers
Constructor Detail

VariableDef

VariableDef(java.lang.String name,
            Occurrence occ,
            ClassDef type,
            ScopedDef parentScope,
            java.util.Vector modifiers)
Constructor to create a new variable symbol

VariableDef

VariableDef(java.lang.String name,
            Occurrence occ,
            ClassDef type,
            ScopedDef parentScope)
Constructor to create a new variable symbol
Method Detail

getType

public Definition getType()
get the type of the variable
Specified by:
getType in interface TypedDef

GetLocation

public java.lang.String GetLocation(int TypID,
                                    java.lang.String sName)
Overrides:
GetLocation in class Definition

GetItem

public java.lang.String GetItem(int TypID)
Overrides:
GetItem in class Definition

GetItems

public java.util.Vector GetItems(int TypID,
                                 java.lang.String modifier)
Overrides:
GetItems in class Definition

report

public void report(IndentingPrintWriter out)
Write information about this variable to the report
Overrides:
report in class Definition

resolveTypes

void resolveTypes(SymbolTable symbolTable)
Resolve referenced symbols used by this variable
Overrides:
resolveTypes in class Definition