[강운덕] [LUCYSUS-1744] 추적 대상 데이터를 호출되는 api 기반으로 변경함.

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@881 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Woonduk Kang
2012-11-20 09:34:18 +00:00
parent 188ef0a047
commit cbdb866f41
8 changed files with 105 additions and 63 deletions
@@ -163,6 +163,9 @@ public class JavaAssistUtils {
public static String[] getParameterVariableName(CtBehavior method) throws NotFoundException {
LocalVariableAttribute localVariableAttribute = lookupLocalVariableAttribute(method);
if (localVariableAttribute == null) {
return getParameterDefaultVariableName(method);
}
return getParameterVariableName(method, localVariableAttribute);
}
@@ -185,7 +188,7 @@ public class JavaAssistUtils {
// 이거 참고함.
if (localVariableAttribute == null) {
// null이라는건 debug모드로 컴파일 되지 않았다는 의미이다.
// parameter class명을 default로 하자.
// parameter class명을 default로 넘기는 건 아래 메소드가 함. getParameterDefaultVariableName.
return null;
}
CtClass[] parameterTypes = method.getParameterTypes();
@@ -209,4 +212,13 @@ public class JavaAssistUtils {
}
return parameterVariableNames;
}
public static String[] getParameterDefaultVariableName(CtBehavior method) throws NotFoundException {
CtClass[] parameterTypes = method.getParameterTypes();
String[] variableName = new String[parameterTypes.length];
for (int i = 0; i < variableName.length; i++) {
variableName[i] = parameterTypes[i].getSimpleName().toLowerCase();
}
return variableName;
}
}