invoked method break
hi
how to break this invoked method's action from other threads ?
Method met = servlet.getClass().getMethod(mname,
new Class[]{ this.getClass()});
met.invoke(servlet,new Object[]{this});
Like Other thread's content:
met.break();
Notes:
i cant change invoked method's source code.
# 3
> im trying break an invoked method. like a thread.
You mean stop it being executed? You can't, unless you kill the thread it's running in (note that all code is running in a thread, whether you consciously create that thread or not) or the method was designed such that you can tell it to stop, by setting a flag or something. What are you trying to achieve? I mean, why do you want to force a method to return early?