[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] How do I generate a method Signature programatically?

Oh, I forgot: I use AspectJ 1.6.7

Olle Hallin
Senior Java Developer and Architect
olle.hallin@xxxxxxxx
www.crisp.se
http://www.linkedin.com/in/ollehallin



2010/5/10 Andy Clement <andrew.clement@xxxxxxxxx>
Unfortunately there is no helper code to convert that way. ÂCan you
convert the other way instead? ÂMethodSignatureImpl (the
implementation of Signature for methods) includes a getMethod() that
should return the java.lang.reflect.Method.

cheers
Andy

On 10 May 2010 01:11, Olle Hallin <olle.hallin@xxxxxx> wrote:
> Hi,
> I'm working on my DeadCodeDetector aspect in my spare time, and now it
> detects constructed but unused classes (by using a combination of
> staticinitialization and execution pointcuts).
> Now I want to continue and make it detect unused public methods.
> For this I intend to use reflection in the after class loading advice, and
> insert one string for each public method in a Set<String> unusedMethods,
> which later can be removed by the after public method execution advice.
> So what I need is to transform a java.lang.reflect.Method to a
> org.aspectj.lang.Signature. How do I do that?
> Olle Hallin
> Senior Java Developer and Architect
> olle.hallin@xxxxxxxx
> www.crisp.se
> http://www.linkedin.com/in/ollehallin
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users