mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-22 03:06:26 +10:00
- ContextClassLoader를 이용하여 reflection으로 동적 호출되는 interceptor코드를 생성한다. 일반적인 was환경에서는 ContextClassLoader는 WebAppClassLoader가 되어 Agent의 cl보다 더 하위 cl이라 문제가 발생하지 않을것임. git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@1301 84d0f5b1-2673-498c-a247-62c4ff18d310
45 lines
1.8 KiB
Java
45 lines
1.8 KiB
Java
package com.profiler.interceptor.bci;
|
|
|
|
import javassist.CannotCompileException;
|
|
import javassist.CtMethod;
|
|
|
|
import com.profiler.interceptor.Interceptor;
|
|
|
|
public interface InstrumentClass {
|
|
|
|
boolean insertCodeBeforeMethod(String methodName, String[] args, String code);
|
|
|
|
boolean insertCodeAfterMethod(String methodName, String[] args, String code);
|
|
|
|
int addConstructorInterceptor(String[] args, Interceptor interceptor) throws InstrumentException, NotFoundInstrumentException;
|
|
|
|
int reuseInterceptor(String methodName, String[] args, int interceptorId) throws InstrumentException, NotFoundInstrumentException;
|
|
|
|
|
|
int addInterceptor(String methodName, String[] args, Interceptor interceptor) throws InstrumentException, NotFoundInstrumentException;
|
|
|
|
int addInterceptorFromContextClassLoader(String methodName, String[] args, Interceptor interceptor) throws InstrumentException, NotFoundInstrumentException;
|
|
|
|
int addInterceptor(String methodName, String[] args, Interceptor interceptor, Type type) throws InstrumentException, NotFoundInstrumentException;
|
|
|
|
boolean addDebugLogBeforeAfterMethod();
|
|
|
|
boolean addDebugLogBeforeAfterConstructor();
|
|
|
|
byte[] toBytecode() throws InstrumentException ;
|
|
|
|
Class<?> toClass() throws InstrumentException;
|
|
|
|
void addTraceVariable(String variableName, String setterName, String getterName, String variableType, String initValue) throws InstrumentException;
|
|
|
|
void addTraceVariable(String variableName, String setterName, String getterName, String variableType) throws InstrumentException;
|
|
|
|
boolean insertCodeAfterConstructor(String[] args, String code);
|
|
|
|
boolean insertCodeBeforeConstructor(String[] args, String code);
|
|
|
|
public CtMethod[] getDeclaredMethods();
|
|
|
|
public boolean isInterceptable();
|
|
}
|