Class ChicoryPremain


  • public class ChicoryPremain
    extends Object
    This class is the entry point for the Chicory instrumentation agent. It is the only code in ChicoryPremain.jar.
    • Field Detail

      • daikon_port

        public static int daikon_port
        Socket port to communicate with Daikon.
      • debug_runtime

        public static boolean debug_runtime
        Turn on most Runtime debugging options.
      • verbose

        public static boolean verbose
        Print information about the classes being transformed.
    • Method Detail

      • premain

        public static void premain​(String agentArgs,
                                   Instrumentation inst)
                            throws IOException
        This method is the entry point of the Java agent. Its main purpose is to set up the transformer so that when classes from the target app are loaded, they are first transformed.

        This method also sets up some other initialization tasks: it connects to Daikon over a port if necessary, or reads in a purity analysis.

        Throws:
        IOException
      • shouldDoPurity

        @EnsuresNonNullIf(result=true,
                          expression="pureMethods")
        public static boolean shouldDoPurity()
        Return true iff Chicory has run a purity analysis or read a *.pure file.
      • isMethodPure

        @RequiresNonNull("pureMethods")
        public static boolean isMethodPure​(Member member)
        Checks if member is one of the pure methods found in a purity analysis or supplied from a *.pure file.
        Returns:
        true iff member is a pure method
      • getPureMethods

        @RequiresNonNull("pureMethods")
        public static Set<StringgetPureMethods()
        Return an unmodifiable Set of the pure methods.