Accessing parameter names in advice [message #49510] |
Mon, 07 March 2005 05:59  |
Eclipse User |
|
|
|
Originally posted by: simon.heinzle.adnovum.ch
I'm currently writing an Enter/Leave tracing aspect for Debugging. The
output of it should be somewhat like "Entering method m_name(p_name =
p_value,...)".
Is there a way of getting the names(identifiers) of the parameters in an
advice generic?
With thisJoinPoint only the parameter values and their types can be
queried. A solution like
before (String target, int count) :
execution(* *.calculateValue(String, int))
&& args(target, count)
{
// Output: "Entering method calculateValue(target="+target
",
count" + count);
|
|
|
Re: Accessing parameter names in advice [message #51568 is a reply to message #49510] |
Sat, 14 May 2005 21:18  |
Eclipse User |
|
|
|
Originally posted by: aronbock.hotmail.com
There's an example of how to do exactly this in the AJDT help docs that ship
with the plugin (v1.2x), and integrated into Eclipse Help. See
menubar/Help/Contents.
Regards,
--A
"Simon Heinzle" <simon.heinzle@adnovum.ch> wrote in message
news:d0hc76$pkf$1@www.eclipse.org...
> I'm currently writing an Enter/Leave tracing aspect for Debugging. The
> output of it should be somewhat like "Entering method m_name(p_name =
> p_value,...)".
>
> Is there a way of getting the names(identifiers) of the parameters in an
> advice generic?
> With thisJoinPoint only the parameter values and their types can be
> queried. A solution like
>
>
> before (String target, int count) : execution(* *.calculateValue(String,
> int))
> && args(target, count) {
> // Output: "Entering method calculateValue(target="+target
> ", count" + count);
>
|
|
|
Re: Accessing parameter names in advice [message #588080 is a reply to message #49510] |
Sat, 14 May 2005 21:18  |
Eclipse User |
|
|
|
Originally posted by: aronbock.hotmail.com
There's an example of how to do exactly this in the AJDT help docs that ship
with the plugin (v1.2x), and integrated into Eclipse Help. See
menubar/Help/Contents.
Regards,
--A
"Simon Heinzle" <simon.heinzle@adnovum.ch> wrote in message
news:d0hc76$pkf$1@www.eclipse.org...
> I'm currently writing an Enter/Leave tracing aspect for Debugging. The
> output of it should be somewhat like "Entering method m_name(p_name =
> p_value,...)".
>
> Is there a way of getting the names(identifiers) of the parameters in an
> advice generic?
> With thisJoinPoint only the parameter values and their types can be
> queried. A solution like
>
>
> before (String target, int count) : execution(* *.calculateValue(String,
> int))
> && args(target, count) {
> // Output: "Entering method calculateValue(target="+target
> ", count" + count);
>
|
|
|
Powered by
FUDForum. Page generated in 0.23892 seconds