mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-21 02:35:53 +10:00
[강운덕] [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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user