[jboss-cvs] jboss-profiler/java/src/expansion/org/jboss/profiler/exp/agent/interceptor/jbossaop ...
Takuro Okada
t2-okada at nri.co.jp
Fri Mar 2 00:32:57 EST 2007
User: tokada
Date: 07/03/02 00:32:57
Modified: java/src/expansion/org/jboss/profiler/exp/agent/interceptor/jbossaop
Tag: JBossProfiler_Expansion AopInterceptor.java
Log:
Correct a method to create operation name
Revision Changes Path
No revision
No revision
1.1.2.4 +30 -23 jboss-profiler/java/src/expansion/org/jboss/profiler/exp/agent/interceptor/jbossaop/Attic/AopInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: AopInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/jboss-profiler/java/src/expansion/org/jboss/profiler/exp/agent/interceptor/jbossaop/Attic/AopInterceptor.java,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -b -r1.1.2.3 -r1.1.2.4
--- AopInterceptor.java 27 Feb 2007 06:02:41 -0000 1.1.2.3
+++ AopInterceptor.java 2 Mar 2007 05:32:57 -0000 1.1.2.4
@@ -202,51 +202,58 @@
if(invocation instanceof MethodInvocation) {
MethodInvocation dInvocation = (MethodInvocation) invocation;
Method method = dInvocation.getActualMethod();
- String[] splitMethod = method.getName().split("\\$");
- operationName = method.getDeclaringClass().getName() + "." + splitMethod[splitMethod.length-2];
+ operationName = method.getDeclaringClass().getName() + "." + method.getName();
if(collectArgs) arguments = dInvocation.getArguments();
- } else if(invocation instanceof FieldInvocation) {
- FieldInvocation dInvocation = (FieldInvocation)invocation;
- operationName = dInvocation.getTargetObject().getClass().getName() + "." + dInvocation.getField().getName();
- } else if(invocation instanceof ConstructorInvocation) {
+ }
+ else if(invocation instanceof ConstructorInvocation) {
ConstructorInvocation dInvocation = (ConstructorInvocation)invocation;
- operationName = dInvocation.getTargetObject() + "." + dInvocation.getConstructor().getName();
+ operationName = dInvocation.getTargetObject() + ".<create>";
if(collectArgs) arguments = dInvocation.getArguments();
- } else if(invocation instanceof CallerInvocation) {
+ }
+ else if(invocation instanceof FieldInvocation) {
+ FieldInvocation dInvocation = (FieldInvocation)invocation;
+ operationName = dInvocation.getTargetObject().getClass().getName() + "." + dInvocation.getField().getName();
+ }
+ else if(invocation instanceof CallerInvocation) {
CallerInvocation callerInvocation = (CallerInvocation)invocation;
operationName = callerInvocation.getTargetObject().getClass().getName() + ".";
- if(callerInvocation instanceof ConstructorCalledByConstructorInvocation) {
- ConstructorCalledByConstructorInvocation dInvocation = (ConstructorCalledByConstructorInvocation)callerInvocation;
- operationName = operationName.concat(dInvocation.getCalledConstructor().getName());
- if(collectArgs) arguments = dInvocation.getArguments();
- // This invocation cannot get caller object.
- caller = dInvocation.getCallingConstructor().getDeclaringClass().getName();
- } else if(callerInvocation instanceof ConstructorCalledByMethodInvocation) {
- ConstructorCalledByMethodInvocation dInvocation = (ConstructorCalledByMethodInvocation)callerInvocation;
- operationName = operationName.concat(dInvocation.getCalledConstructor().getName());
+
+ if(callerInvocation instanceof MethodCalledByMethodInvocation) {
+ MethodCalledByMethodInvocation dInvocation = (MethodCalledByMethodInvocation)callerInvocation;
+ operationName = operationName.concat(dInvocation.getCalledMethod().getName());
if(collectArgs) arguments = dInvocation.getArguments();
if(dInvocation.getCallingObject() instanceof Servlet) {
caller = "<servlet>";
}else {
caller = dInvocation.getCallingClass().getName();
}
- } else if(callerInvocation instanceof MethodCalledByConstructorInvocation) {
+ }
+ else if(callerInvocation instanceof MethodCalledByConstructorInvocation) {
MethodCalledByConstructorInvocation dInvocation = (MethodCalledByConstructorInvocation)callerInvocation;
operationName = operationName.concat(dInvocation.getCalledMethod().getName());
if(collectArgs) arguments = dInvocation.getArguments();
// This invocation cannot get caller object.
caller = dInvocation.getCalling().getDeclaringClass().getName();
- } else if(callerInvocation instanceof MethodCalledByMethodInvocation) {
- MethodCalledByMethodInvocation dInvocation = (MethodCalledByMethodInvocation)callerInvocation;
- operationName = operationName.concat(dInvocation.getCalledMethod().getName());
+ }
+ else if(callerInvocation instanceof ConstructorCalledByMethodInvocation) {
+ ConstructorCalledByMethodInvocation dInvocation = (ConstructorCalledByMethodInvocation)callerInvocation;
+ operationName = operationName.concat(dInvocation.getCalledConstructor().getName());
if(collectArgs) arguments = dInvocation.getArguments();
if(dInvocation.getCallingObject() instanceof Servlet) {
caller = "<servlet>";
}else {
caller = dInvocation.getCallingClass().getName();
}
- } else {
- operationName.concat("<unknown>");
+ }
+ else if(callerInvocation instanceof ConstructorCalledByConstructorInvocation) {
+ ConstructorCalledByConstructorInvocation dInvocation = (ConstructorCalledByConstructorInvocation)callerInvocation;
+ operationName = operationName.concat(dInvocation.getCalledConstructor().getName());
+ if(collectArgs) arguments = dInvocation.getArguments();
+ // This invocation cannot get caller object.
+ caller = dInvocation.getCallingConstructor().getDeclaringClass().getName();
+ }
+ else {
+ operationName = operationName.concat("<unknown>");
}
}else {
operationName = "<Unknown>";
More information about the jboss-cvs-commits
mailing list