blob: fa7934a90e4e7ff1a4b6463b2a5581d070712b58 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
[[reflection]]
= New Reflection Interfaces
AspectJ 5 provides a full set of reflection APIs analogous to the
`java.lang.reflect` package, but fully aware of the AspectJ type system.
See the javadoc for the runtime and tools APIs for the full details. The
reflection APIs are only supported when running under Java 5 and for
code compiled by the AspectJ 5 compiler at target level 1.5.
[[reflection_api]]
== Using `AjTypeSystem`
The starting point for using the reflection apis is
`org.aspectj.lang.reflect.AjTypeSystem` which provides the method
`getAjType(Class)` which will return the `AjType` corresponding to a
given Java class. The `AjType` interface corresponds to
`java.lang.Class` and gives you access to all of the method, field,
constructor, and also pointcut, advice, declare statement and inter-type
declaration members in the type.
|