|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.mtu.eggplant.dbc.Symtab
Class that keeps track of all classes and interfaces parsed in this run. This is the place where most of the work for instrumentation gets done. All lookups are done here.
Constructor Summary | |
Symtab(Configuration config)
|
Method Summary | |
void |
addCodeFragment(CodeFragment cf)
Associate this CodeFragment with the current file begin parsed. |
void |
addImport(String className,
String packageName)
Add to the list of imports for this class. |
void |
finishClass(CodePoint cp)
Take all of the assertion methods that have been cached up and dump them out with this class. |
void |
finishFile(boolean writeFile)
Just resets the internal pointers to files to be the last file we pushed on the file stack, or null if no other files are being processed. |
void |
finishMethod(CodePointPair startEnd,
Set thrownExceptions)
Finishes the method that is currently being parsed. |
Configuration |
getConfiguration()
|
AssertClass |
getCurrentClass()
Accessor for the currnet class being instrumented. |
net.mtu.eggplant.dbc.InstrumentedFile |
getCurrentFile()
|
AssertMethod |
getCurrentMethod()
Get at the method that's currently being parsed. |
String |
getCurrentPackageName()
|
void |
instrument(net.mtu.eggplant.dbc.InstrumentedFile ifile)
instrument a file we've parsed. |
boolean |
isDestinationOlderThanCurrentFile(String packageName)
|
void |
setCurrentPackageName(String packageName)
set the package the the next class(es) belong to |
void |
startClass(String name,
List invariants,
boolean isInterface,
boolean isAnonymous,
String superclass)
Push a class onto the stack of classes to handle inner classes. |
boolean |
startFile(File f)
Start a file. |
void |
startMethod(String name,
List preConditions,
List postConditions,
List params,
String retType,
Set mods)
Creates a new AssertMethod object for the current class and sets this as the current method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Symtab(Configuration config)
Method Detail |
public final Configuration getConfiguration()
public final void setCurrentPackageName(String packageName)
public final String getCurrentPackageName()
public final net.mtu.eggplant.dbc.InstrumentedFile getCurrentFile()
public boolean startFile(File f)
public void finishFile(boolean writeFile)
public void startClass(String name, List invariants, boolean isInterface, boolean isAnonymous, String superclass)
name
- the name of the class, can be null in the case of anonomous
classesinvariants
- the invariants for this class, ordered as they appear
in the source filepublic void finishClass(CodePoint cp)
cp
- the point that represents the closing curly brace of the class,
the checkInvariant method will be inserted here.public final AssertClass getCurrentClass()
public void instrument(net.mtu.eggplant.dbc.InstrumentedFile ifile)
public void addCodeFragment(CodeFragment cf)
cf
- fragment of code that needs to be insertedpublic void addImport(String className, String packageName)
className
- the name of class from the import statement, null if a star importpackageName
- the name of the package package from the import statementpublic void startMethod(String name, List preConditions, List postConditions, List params, String retType, Set mods)
name
- the name of this method, null for a constructorpreConditions
- the preconditions for this methodpostConditions
- the postconditions for this methodparams
- Set of StringPairs, (class, parameter name)retType
- the return type of this method, null signals this method is a constructormods
- the modifiers for the method, Set of Stringspublic void finishMethod(CodePointPair startEnd, Set thrownExceptions)
startEnd
- two code points representing the opening and closing braces of the method, these points are equal if the method is abstract/nativethrownExceptions
- list of exceptions this method declares in it's throws clause, null if no exceptions are declaredpublic AssertMethod getCurrentMethod()
public boolean isDestinationOlderThanCurrentFile(String packageName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |