Package daikon.chicory
Class ChicoryPremain
- Object
-
- 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ChicoryPremain.ChicoryLoader
Classloader for the BCEL code.
-
Field Summary
Fields Modifier and Type Field Description static int
daikon_port
Socket port to communicate with Daikon.static boolean
debug_runtime
Turn on most Runtime debugging options.static boolean
verbose
Print information about the classes being transformed.
-
Constructor Summary
Constructors Constructor Description ChicoryPremain()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Set<String>
getPureMethods()
Return an unmodifiable Set of the pure methods.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.static void
premain(String agentArgs, Instrumentation inst)
This method is the entry point of the Java agent.static boolean
shouldDoPurity()
Return true iff Chicory has run a purity analysis or read a*.pure
file.
-
-
-
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.
-
-
Constructor Detail
-
ChicoryPremain
public ChicoryPremain()
-
-
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<String> getPureMethods()
Return an unmodifiable Set of the pure methods.
-
-