Include class patterns into interceptor's toString
This commit is contained in:
+1
@@ -95,6 +95,7 @@ public class InterceptionInstrumenter {
|
||||
String methodName = nameFromAnnotation.isEmpty() ? field.getName() : nameFromAnnotation;
|
||||
MethodInstrumenterImpl instrumenter = new MethodInstrumenterImpl(
|
||||
field.getDeclaringClass().getSimpleName() + "." + field.getName(),
|
||||
classPattern,
|
||||
compilePattern(methodName),
|
||||
compilePattern(annotation.erasedSignature()),
|
||||
annotation.allowMultipleMatches(),
|
||||
|
||||
+5
-2
@@ -21,6 +21,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
class MethodInstrumenterImpl implements MethodInstrumenter {
|
||||
private final String debugName;
|
||||
private final Pattern classPattern;
|
||||
private final Pattern namePattern;
|
||||
private final Pattern descPattern;
|
||||
private final boolean allowMultipleMatches;
|
||||
@@ -29,7 +30,8 @@ class MethodInstrumenterImpl implements MethodInstrumenter {
|
||||
private final boolean logApplications;
|
||||
|
||||
public MethodInstrumenterImpl(
|
||||
String debugName, Pattern namePattern,
|
||||
String debugName,
|
||||
Pattern classPattern, Pattern namePattern,
|
||||
Pattern descPattern,
|
||||
boolean allowMultipleMatches,
|
||||
List<MethodData> enterData,
|
||||
@@ -37,6 +39,7 @@ class MethodInstrumenterImpl implements MethodInstrumenter {
|
||||
boolean logApplications
|
||||
) {
|
||||
this.debugName = debugName;
|
||||
this.classPattern = classPattern;
|
||||
this.namePattern = namePattern;
|
||||
this.descPattern = descPattern;
|
||||
this.allowMultipleMatches = allowMultipleMatches;
|
||||
@@ -74,6 +77,6 @@ class MethodInstrumenterImpl implements MethodInstrumenter {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return debugName + "[" + namePattern + " " + descPattern + (allowMultipleMatches ? " multiple" : "") + "]";
|
||||
return debugName + "[" + classPattern + ":" + namePattern + " " + descPattern + (allowMultipleMatches ? " multiple" : "") + "]";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user