daikon.chicory
Class DaikonWriter

Object
  extended by DaikonWriter
Direct Known Subclasses:
DeclWriter, DTraceWriter

public abstract class DaikonWriter
extends Object

DaikonWriter is the parent class of DeclWriter and DTraceWriter.


Field Summary
static String lineSep
          Platform dependent line separator.
protected static boolean no_modifiers_ppt
          Controls whether modifiers and the return type are included in the decl output
 
Constructor Summary
protected DaikonWriter()
           
 
Method Summary
 String escape(String str)
          Escapes blanks and backslashes in names written to the decl/dtrace files
protected static boolean isStaticConstField(Field field)
          Determines if this field warrants an [ = val ] entry in decls file
static String methodEntryName(Member method)
          Given a method, returns the method entry program point name for Daikon
static String methodEntryName(String fullClassName, String[] types, String name, String short_name)
          Given a method, returns the method entry program point name for Daikon method entry name for Daikon.
static String methodExitName(Member method, int lineNum)
          Given a method, returns the method exit program point name for Daikon
static String methodExitName(String fullClassName, String[] types, String name, String short_name, int lineNum)
          Given a method, returns the method exit program point name for Daikon
protected  boolean shouldInstrumentMethod(Member method)
          Determines if the given method should be instrumented
static String stdClassName(Class<?> type)
          Returns the class name of the specified class in 'java' format (i.e., as the class would have been declared in java source code)
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

no_modifiers_ppt

protected static final boolean no_modifiers_ppt
Controls whether modifiers and the return type are included in the decl output

See Also:
Constant Field Values

lineSep

public static final String lineSep
Platform dependent line separator. Should be "\n" on Unix

Constructor Detail

DaikonWriter

protected DaikonWriter()
Method Detail

isStaticConstField

protected static boolean isStaticConstField(Field field)
Determines if this field warrants an [ = val ] entry in decls file

Parameters:
field - requires field != null
Returns:
true iff field warrants an [ = val ] entry in the decls files

methodEntryName

public static String methodEntryName(Member method)
Given a method, returns the method entry program point name for Daikon

Parameters:
method - non-null method
Returns:
the decorated method entry name for Daikon

methodEntryName

public static String methodEntryName(String fullClassName,
                                     String[] types,
                                     String name,
                                     String short_name)
Given a method, returns the method entry program point name for Daikon method entry name for Daikon. Used when reflection information is not available

Parameters:
types - Argument types
Returns:
the decorated method entry name for Daikon

methodExitName

public static String methodExitName(Member method,
                                    int lineNum)
Given a method, returns the method exit program point name for Daikon

Parameters:
method - require method != null
lineNum - The line number of the exit point of the method
Returns:
the decorated method exit name for Daikon

methodExitName

public static String methodExitName(String fullClassName,
                                    String[] types,
                                    String name,
                                    String short_name,
                                    int lineNum)
Given a method, returns the method exit program point name for Daikon

Parameters:
types - Argument types
lineNum - The line number of the exit point of the method
Returns:
the decorated method entry name for Daikon

shouldInstrumentMethod

protected boolean shouldInstrumentMethod(Member method)
Determines if the given method should be instrumented


stdClassName

public static String stdClassName(Class<?> type)
Returns the class name of the specified class in 'java' format (i.e., as the class would have been declared in java source code)


escape

public String escape(String str)
Escapes blanks and backslashes in names written to the decl/dtrace files