to get values passed to a method as its arguments - how?

M

Martin Demberger

Am Fri, 14 Aug 2009 10:30:31 -0700 (PDT) schrieb Adam Wozniak:
Hello

Is it possible to get (automatically / magically) values passed to a
method as its arguments?

Example:
void myMethod(int a, int b)
{
String arguments = ´All arguments: ´ + getAllArguments();
System.out.println();
}

Output:
All arguments: int a=1, int b=2

Somebody knows how to implement getAllArguments method?

Kind regards,
Adam Wozniak

If your call of the method is done via an interface you can write a proxy
that handles the exception and adds all parameters.

I don't have an development environment arround, so I am not able to give
you an example. Sorry...

cu Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top