This question already has an answer here:
So, this is my problem: I'm making a plugin for another Java application. In my plugin I have this:
public class FooExtended extends Foo
{
@Override
public int doSomeWork(int useful, boolean notSoMuch)
{
// vital parameter missing...
}
}
Now, the problem is that in the doSomeWork()
, I need another parameter, vital
. But this parameter is not passed to me, and FooExtended
is a singleton and doSomeWork()
is called over and over again for different values of vital
. But, this parameter is passed to a method two calls "above" doSomeWork()
, passed to some other methods, but not to me.
Is there a way to get locals of the callers? And also, that is the only call of doSomeWork(), so the line two callers above is unique (no need to worry about reflection not found issues)
Aucun commentaire:
Enregistrer un commentaire