[Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 316
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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