[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[aspectj-users] How do I generate a method Signature programatically?
|
- From: Olle Hallin <olle.hallin@xxxxxx>
- Date: Mon, 10 May 2010 10:11:19 +0200
- Delivered-to: aspectj-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=oq8ZTL4jK+L2GKPL4yUuGittD8PSuBibkYvBdEbiJpk=; b=Z576UKFfuPScmdclFTrevGYQdGignkZSj2PRO18s+eg1Of2ygFKg1neQGZsU2SElnh gUBDlZm0skGiHUVB8NMrLAIZ4yPkivh023F3lDCssLc58CbaDnnYehzyeRAQX6J2It4r DnOpx5kFWjj8tSUopUZ4YSGOWZ3OZKd2rANeE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=ChPaD8Mi7caLZz9sf7+MugzBGI2Tox80u7ib69Mk6lfxebgBm5fwWEl+IVnTkcR+F4 s6qzypisVJIVeKqvV1ed3RzZPZ/BuXEBGNoxSDFXpC9oJX6QXtzX7Py5vsc0bQjrwJll XKQ9FGmwL/IvzeKa3YmUkTWaQugqKi3jzUhLk=
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?