|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--envgen.codegen.EnvPrinter
Class used for various printing tasks: printing of environment classes into their separate files, printing of error messages.
| Field Summary | |
(package private) static java.lang.String |
context
Set to use identify the framework to be used with the generated program (Bandera or JPF). |
(package private) int |
debug
|
(package private) java.util.HashMap |
envTable
|
(package private) java.lang.String |
outputDirName
|
(package private) static java.lang.String |
packageName
|
(package private) java.util.HashMap |
unitTable
|
| Constructor Summary | |
EnvPrinter(java.util.HashMap unitTable,
java.util.HashMap envTable)
|
|
| Method Summary | |
static void |
error(java.lang.String msg)
Prints the error message and halts the execution. |
static java.lang.String |
getBeginAtomicCall()
|
private soot.SootMethod |
getConstructor(soot.SootClass sc)
|
static java.lang.String |
getDefValName(soot.Type type)
|
static java.lang.String |
getEndAtomicCall()
|
private java.lang.String |
getFullPathName(java.lang.String name)
Returns the name of the path by replacing "." with "/". |
static java.lang.String |
getPackageAdjustedName(java.lang.String name)
|
static java.lang.String |
getPackageAdjustedName(soot.Type type)
Returns the name of type as a string. |
private java.lang.String |
getPackageName(java.lang.String name)
Returns the name of the package from name. |
private java.lang.String |
getPathName(java.lang.String name)
Returns the name of the path by replacing "." with "/". |
static java.lang.String |
getPrefixedName(java.lang.String name)
Appends a dummy prefix to a name, Scene doesn't allow multiple classes with the same name, therefore stubs have special prefixed names. |
static java.lang.String |
getRandomBoolCall()
|
static java.lang.String |
getRandomIntCall(int n)
|
static java.lang.String |
getRandomObjectCall(soot.Type type)
|
static java.lang.String |
getRandomReachableCall(soot.Type type,
java.lang.String from)
|
static java.lang.String |
getRealName(java.lang.String name)
Removes the prefix, reveals the real name of a class. |
static java.lang.String |
getShortName(java.lang.String name)
Returns a name of the class name excluding the package name. |
static java.lang.String |
getTopArgs(java.util.List types)
Generates a list of top values for a list of types. |
static java.lang.String |
getTopValName(soot.Type type)
Returns a name for a top value of type. |
private void |
printClass(java.io.FileWriter file,
soot.SootClass sc)
Prints sc class to a file. |
private void |
printf(java.io.FileWriter outStream,
java.lang.String string)
Prints string to a file. |
private void |
printFields(java.io.FileWriter file,
soot.SootClass sc)
Prints fields of sc to a file. |
void |
printfTable(java.util.HashMap markedTable)
Prints soot classes of markedTable to their files. |
private void |
printInterface(java.io.FileWriter file,
soot.SootClass sc)
Prints information about interfaces of sc to a file. |
private void |
printMethod(java.io.FileWriter file,
soot.SootMethod markedMethod)
Prints method of sc to file. |
private void |
printMethods(java.io.FileWriter file,
soot.SootClass sc)
Prints methods of sc to file. |
private void |
printParams(java.io.FileWriter file,
soot.SootMethod markedMethod)
Prints parameters of markedMethod to file. |
static void |
printTable(java.util.HashMap table)
Prints a hashtable of sootclasses and their methods. |
private void |
printThrowsExceptions(java.io.FileWriter file,
soot.SootMethod markedMethod)
|
void |
setEnvTable(java.util.HashMap envTable)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
java.util.HashMap unitTable
java.util.HashMap envTable
static java.lang.String packageName
java.lang.String outputDirName
static java.lang.String context
int debug
| Constructor Detail |
public EnvPrinter(java.util.HashMap unitTable,
java.util.HashMap envTable)
| Method Detail |
public void setEnvTable(java.util.HashMap envTable)
public static void printTable(java.util.HashMap table)
public void printfTable(java.util.HashMap markedTable)
markedTable to their files.
private void printf(java.io.FileWriter outStream,
java.lang.String string)
private void printClass(java.io.FileWriter file,
soot.SootClass sc)
sc class to a file.
private void printInterface(java.io.FileWriter file,
soot.SootClass sc)
sc to a file.
private void printFields(java.io.FileWriter file,
soot.SootClass sc)
sc to a file.
private void printMethods(java.io.FileWriter file,
soot.SootClass sc)
sc to file.
private void printMethod(java.io.FileWriter file,
soot.SootMethod markedMethod)
sc to file.
private void printParams(java.io.FileWriter file,
soot.SootMethod markedMethod)
markedMethod to file.
private void printThrowsExceptions(java.io.FileWriter file,
soot.SootMethod markedMethod)
file - markedMethod - private soot.SootMethod getConstructor(soot.SootClass sc)
public static java.lang.String getRealName(java.lang.String name)
public static java.lang.String getPrefixedName(java.lang.String name)
private java.lang.String getFullPathName(java.lang.String name)
private java.lang.String getPathName(java.lang.String name)
public static java.lang.String getShortName(java.lang.String name)
name excluding the package name.
private java.lang.String getPackageName(java.lang.String name)
name.
public static java.lang.String getPackageAdjustedName(java.lang.String name)
public static java.lang.String getPackageAdjustedName(soot.Type type)
type as a string.
public static java.lang.String getBeginAtomicCall()
public static java.lang.String getEndAtomicCall()
public static java.lang.String getRandomBoolCall()
public static java.lang.String getRandomIntCall(int n)
public static java.lang.String getRandomObjectCall(soot.Type type)
public static java.lang.String getRandomReachableCall(soot.Type type,
java.lang.String from)
public static java.lang.String getTopValName(soot.Type type)
type.
public static java.lang.String getTopArgs(java.util.List types)
types.
public static java.lang.String getDefValName(soot.Type type)
public static void error(java.lang.String msg)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||