daikon.chicory
Class DeclWriter

Object
  extended by DaikonWriter
      extended by DeclWriter

public class DeclWriter
extends DaikonWriter

DeclWriter writes the .decls file to a stream. It uses traversal pattern trees (see DaikonVariableInfo) for each program point. These are also used by the DTraceWriter.


Field Summary
static String declareHeader
          Header string before each new method entry or exit point
 
Fields inherited from class DaikonWriter
lineSep, no_modifiers_ppt
 
Constructor Summary
DeclWriter(PrintStream writer)
          Constructs a DeclWriter, preparing it to receive messages.
 
Method Summary
static String classObjectName(Class<?> type)
          Returns the correctly formulated ":::OBJECT" name of the class (i.e., the program point name)
 void print_decl_class(ClassInfo cinfo, DeclReader comp_info)
          Prints declarations for all the methods in the indicated class.
 void printDeclClass(ClassInfo cinfo, DeclReader comp_info)
          Prints declarations for all the methods in the indicated class.
 void printHeaderInfo(String className)
          Prints header information to the decls file.
 
Methods inherited from class DaikonWriter
escape, isStaticConstField, methodEntryName, methodEntryName, methodExitName, methodExitName, shouldInstrumentMethod, stdClassName
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

declareHeader

public static final String declareHeader
Header string before each new method entry or exit point

See Also:
Constant Field Values
Constructor Detail

DeclWriter

public DeclWriter(PrintStream writer)
Constructs a DeclWriter, preparing it to receive messages.

Parameters:
writer - Stream to write to
Method Detail

printHeaderInfo

public void printHeaderInfo(String className)
Prints header information to the decls file. Should be called once before emitting any other declarations.

Parameters:
className - Name of the top-level class (used only for printing comments)

classObjectName

public static String classObjectName(Class<?> type)
Returns the correctly formulated ":::OBJECT" name of the class (i.e., the program point name)

Parameters:
type - the ClassType type
Returns:
the correctly formulated String

printDeclClass

public void printDeclClass(ClassInfo cinfo,
                           DeclReader comp_info)
Prints declarations for all the methods in the indicated class. This method is called in Runtime to print decls info for a class.

Parameters:
cinfo - Class whose declarations should be printed.

print_decl_class

public void print_decl_class(ClassInfo cinfo,
                             DeclReader comp_info)
Prints declarations for all the methods in the indicated class. This method is called in Runtime to print decls info for a class.

Parameters:
cinfo - Class whose declarations should be printed.