Class EnhanceTool
- java.lang.Object
-
- org.glassfish.pfl.tf.tools.enhancer.EnhanceTool
-
public class EnhanceTool extends java.lang.Object
Tool for enhancing classes annotated with tracing facility annotations. The processing is divided into two phases:- The first phase adds code to the static initialized of the class to register the class with the TF framework. This phase also modifies all calls to @InfoMethod annotated methods to pass extra arguments needed for tracing. Note that this phase must be done at build time, because it modifies the schema of the class.
- The second phase adds the actual trace code to methods annotated with tracing annotations. This does not change the schema, so this phase could be done either at build time, or at runtime. Tracing the code only at runtime may reduce the overhead, since untraced code need not be modified.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
EnhanceTool.Arguments
private class
EnhanceTool.EnhancerFileAction
static class
EnhanceTool.ProcessingMode
-
Field Summary
Fields Modifier and Type Field Description private EnhanceTool.Arguments
args
private static int
errorCount
private TimingInfoProcessor
tip
private Util
util
-
Constructor Summary
Constructors Constructor Description EnhanceTool()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
doScan(EnhanceTool.Arguments args, ActionFactory af, Scanner scanner, Scanner.Action classAct)
private void
generatePropertiesFile(EnhanceTool.Arguments args, java.util.Set<java.lang.String> anames)
static void
main(java.lang.String[] strs)
private Scanner.Action
makeIgnoreAction(boolean trace)
void
run(java.lang.String[] strs)
-
-
-
Field Detail
-
errorCount
private static int errorCount
-
util
private Util util
-
args
private EnhanceTool.Arguments args
-
tip
private TimingInfoProcessor tip
-
-
Method Detail
-
generatePropertiesFile
private void generatePropertiesFile(EnhanceTool.Arguments args, java.util.Set<java.lang.String> anames) throws java.io.IOException
- Throws:
java.io.IOException
-
makeIgnoreAction
private Scanner.Action makeIgnoreAction(boolean trace)
-
doScan
private void doScan(EnhanceTool.Arguments args, ActionFactory af, Scanner scanner, Scanner.Action classAct) throws java.io.IOException
- Throws:
java.io.IOException
-
run
public void run(java.lang.String[] strs)
-
main
public static void main(java.lang.String[] strs)
-
-