Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example Implementation not match #7

Open
Jordantan1999 opened this issue Jan 6, 2024 · 0 comments
Open

Example Implementation not match #7

Jordantan1999 opened this issue Jan 6, 2024 · 0 comments

Comments

@Jordantan1999
Copy link

For the old implementation
` @OverRide
public void init(String arg) {
System.out.println("Interceptor args: " + arg);
}

@Override
public boolean interceptClass(String className, byte[] byteCode) {
    return true; // all classes can be intrumented
}

@Override
public boolean interceptMethod(ClassNode cn, MethodNode mn) {
    return true; // all methods are instrumented
}

@Override
protected void doOnStart(Method m, Object[] arg, String executionId) {
    System.out.println("doOnStart " + m + " " + executionId);
}

@Override
protected void doOnThrowableThrown(Method m, Throwable throwable, String executionId) {
    System.out.println("doOnThrowableThrown " + m + " " + executionId);
}

@Override
protected void doOnThrowableUncatched(Method m, Throwable throwable, String executionId) {
    System.out.println("doOnThrowableUncatched " + m + " " + executionId);
}

@Override
protected void doOnFinish(Method m, Object result, String executionId) {
    System.out.println("doOnFinish " + m + " " + executionId);
}`

The override methods which has Method as first parameter were not available. The implementable methods are

`@Override
protected void doOnFinish(Object arg0, Object arg1, String arg2) {
// TODO Auto-generated method stub

}

@Override
protected void doOnStart(Object arg0, Object[] arg1, String arg2) {
	// TODO Auto-generated method stub
	
}

@Override
protected void doOnThrowableThrown(Object arg0, Throwable arg1, String arg2) {
	// TODO Auto-generated method stub
	
}

@Override
protected void doOnThrowableUncatched(Object arg0, Throwable arg1, String arg2) {
	// TODO Auto-generated method stub
	
}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant