• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 318
  • Last Modified:

How to identify Java classes tagged with a specific annotation in AspectJ

For example if a java class has an annotation @monitor or @logging etc,what is the format of the pointcut descriptor?
1 Solution
akashsureshAuthor Commented:
Please note it is a class level annotation I am talking about and not a method.
mccarlIT Business Systems Analyst / Software DeveloperCommented:
You should be able to do it like this...

@Pointcut("within(@package.name.monitor *)")
public void targetClasses() {}

Open in new window

And then follow with your normal pointcuts, etc.

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now