[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspectj-users] How AspectJ reflection engine compares against the standard Java one performance wise?
- From: Andy Clement <andrew.clement@xxxxxxxxx>
- Date: Thu, 8 Dec 2011 14:40:31 -0800
- Delivered-to: firstname.lastname@example.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=0CkNrIpM1jvnrlF4AEAakWRJLaL1XFvkwbzuNqepjlI=; b=KMy/LthP3ySfKH0wOD0sR2oamt0pLar+D4zMjyfcu0UNBR5Va6/lT3OfOWrcUjbHG/ 5cKLaZnw8cbz907oyifOF4geo0Zi0ZBKz2XD0bPP+Ur4O6lLx+8QnUj7RQlU91p4MBf6 tmVS7mTSKL8vorL6CwhqzFGjsy+x/yyJUzJAE=
The AspectJ reflection system is purely for introspecting code, it
isn't for invoking code. The reason it exists is to provide you a
reflection infrastructure that knows about things like ITDs and
pointcuts. If you use standard java reflection against a compiled
aspect you will discover it is a 'class' and that the pointcuts are
represented as 'methods' and that ITDs have manifested special methods
called 'ajc$....' throughout. If you use the AjType reflection system
that will provide you with a more AspectJ oriented view of the types -
it will tell you something is an aspect/pointcut/itd and hide the
And as I say it can't be used to invoke anything, use standard
reflection for that.
On 8 December 2011 12:33, Mark <mark.kharitonov@xxxxxxxxx> wrote:
> In other words, if I am writing plain old Java reflection code, should I
> consider rewriting it using the AspectJ reflection system instead, because
> the latter is faster?
> View this message in context: http://aspectj.2085585.n4.nabble.com/How-AspectJ-reflection-engine-compares-against-the-standard-Java-one-performance-wise-tp4174240p4174240.html
> Sent from the AspectJ - users mailing list archive at Nabble.com.
> aspectj-users mailing list