Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Accessing parameter names in advice
Accessing parameter names in advice [message #49510] Mon, 07 March 2005 10:59 Go to next message
Eclipse UserFriend
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] Sun, 15 May 2005 01:18 Go to previous message
Eclipse UserFriend
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] Sun, 15 May 2005 01:18 Go to previous message
Eclipse UserFriend
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);
>
Previous Topic:Eclipse Hangs After Installing AJDT
Next Topic:Inpath jar not getting weaved
Goto Forum:
  


Current Time: Wed Apr 24 14:39:29 GMT 2024

Powered by FUDForum. Page generated in 0.04204 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top