Class DaikonWriter

    • Field Detail

      • lineSep

        public static final String lineSep
        Platform-dependent line separator. Should be "\n" on Unix.
    • 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.className
        types - string representation of the declared types of the parameters
        name - 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 method
        lineNum - 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.className
        types - string representation of the declared types of the parameters
        name - the method name with modifiers and parameters
        short_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).
      • escape

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