org.jcoderz.commons.tracing
Class ClassTracingInjector

java.lang.Object
  extended by org.jcoderz.commons.tracing.ClassTracingInjector

public class ClassTracingInjector
extends Object

Takes care to add Tracing to the methods.

Author:
mandelan

Constructor Summary
ClassTracingInjector(ClassNode cn, boolean java5, boolean pai)
           
 
Method Summary
 String getClassName()
           
 void getClassNameOnStack(InsnList cmd)
          Load the class name reference to the stack.
 ClassNode getClassNode()
           
 void getStaticLoggerOnStack(InsnList cmd)
           
 void inject(TracingInjector.Matcher matcher)
          Injects logging to all methods that match the given matcher.
 void injectStaticLoggerMember(InsnList cmd)
          Injects the static logger member and takes care for the static initialization.
 boolean isJava5()
           
 boolean isPai()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassTracingInjector

public ClassTracingInjector(ClassNode cn,
                            boolean java5,
                            boolean pai)
Parameters:
cn -
java5 -
pai -
Method Detail

inject

public void inject(TracingInjector.Matcher matcher)
Injects logging to all methods that match the given matcher.

Parameters:
matcher - the matcher to identify methods to inject.

getClassNode

public ClassNode getClassNode()

getClassName

public String getClassName()

getStaticLoggerOnStack

public void getStaticLoggerOnStack(InsnList cmd)
Parameters:
cmd -

getClassNameOnStack

public void getClassNameOnStack(InsnList cmd)
Load the class name reference to the stack.

Parameters:
cmd - the instruction list where to add the command to.

injectStaticLoggerMember

public void injectStaticLoggerMember(InsnList cmd)
Injects the static logger member and takes care for the static initialization.

Parameters:
cmd - the command list to add the code to.

isJava5

public boolean isJava5()

isPai

public boolean isPai()


Copyright 2007 The jCoderZ Project.