Package daikon.chicory
Class DaikonWriter
- Object
-
- DaikonWriter
-
- Direct Known Subclasses:
DeclWriter
,DTraceWriter
public abstract class DaikonWriter extends Object
DaikonWriter is the parent class of DeclWriter and DTraceWriter.
-
-
Field Summary
Fields Modifier and Type Field Description 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
Constructors Modifier Constructor Description protected
DaikonWriter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.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 @BinaryName String
stdClassName(Class<?> type)
Returns the class name of the specified class as a binary name (i.e., as the class would have been declared in Java source code, except with '$' instead of '.' separating outer and inner classes).
-
-
-
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
-
-
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. Used when reflection information is not available.- Parameters:
fullClassName
- packageName.classNametypes
- string representation of the declared types of the parametersname
- the method with modifiers and parameters, such as "public static void DataStructures.StackArTester.doNew(int size)"short_name
- just the method's name ("<init>
" for constructors)- 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
- non-null methodlineNum
- the line number of a return statement in 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. Used when reflection information is not available.- Parameters:
fullClassName
- packageName.classNametypes
- string representation of the declared types of the parametersname
- the method name with modifiers and parametersshort_name
- just the method's name ("<init>
" for constructors)lineNum
- the line number of a return statement in the method- Returns:
- the decorated method exit name for Daikon
-
shouldInstrumentMethod
protected boolean shouldInstrumentMethod(Member method)
Determines if the given method should be instrumented.
-
stdClassName
public static @BinaryName String stdClassName(Class<?> type)
Returns the class name of the specified class as a binary name (i.e., as the class would have been declared in Java source code, except with '$' instead of '.' separating outer and inner classes).
-
-