dpt.symbtab
Class Occurrence
java.lang.Object
|
+--dpt.symbtab.Occurrence
- class Occurrence
- extends java.lang.Object
- implements Reportable
An occurrence of an indentifier in a file
Field Summary |
private java.io.File |
file
The file containing the occurrence |
private int |
line
The line number containing the occurrence |
Constructor Summary |
(package private) |
Occurrence(java.io.File file,
int line)
Constructor to define a new occurrence |
Method Summary |
java.lang.String |
getFile()
|
java.lang.String |
GetItem(int TypID)
|
java.util.Vector |
GetItems(int TypID,
java.lang.String sModifier)
|
java.lang.String |
getLine()
return a string representation of the occurrence |
java.lang.String |
getLocation()
return a string representation of the occurrence |
java.lang.String |
GetLocation(int TypID,
java.lang.String sName)
|
void |
report(IndentingPrintWriter out)
Write information about this location to the report |
java.lang.String |
toString()
return a string representation of the occurrence |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
file
private java.io.File file
- The file containing the occurrence
line
private int line
- The line number containing the occurrence
Occurrence
Occurrence(java.io.File file,
int line)
- Constructor to define a new occurrence
getLine
public java.lang.String getLine()
- return a string representation of the occurrence
getFile
public java.lang.String getFile()
getLocation
public java.lang.String getLocation()
- return a string representation of the occurrence
GetLocation
public java.lang.String GetLocation(int TypID,
java.lang.String sName)
- Specified by:
- GetLocation in interface Reportable
GetItem
public java.lang.String GetItem(int TypID)
- Specified by:
- GetItem in interface Reportable
GetItems
public java.util.Vector GetItems(int TypID,
java.lang.String sModifier)
- Specified by:
- GetItems in interface Reportable
report
public void report(IndentingPrintWriter out)
- Write information about this location to the report
- Specified by:
- report in interface Reportable
toString
public java.lang.String toString()
- return a string representation of the occurrence
- Overrides:
- toString in class java.lang.Object