Class EnhanceTool


  • public class EnhanceTool
    extends java.lang.Object
    Tool for enhancing classes annotated with tracing facility annotations. The processing is divided into two phases:
    1. 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.
    2. 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.
    This tool can do either phase 1, or phase 1 and 2, against ALL classes reachable from a starting directory.
    • Constructor Detail

      • EnhanceTool

        public EnhanceTool()
    • 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)
      • run

        public void run​(java.lang.String[] strs)
      • main

        public static void main​(java.lang.String[] strs)