Solved

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

Posted on 2012-04-03
2
297 Views
Last Modified: 2012-04-04
For example if a java class has an annotation @monitor or @logging etc,what is the format of the pointcut descriptor?
0
Comment
Question by:akashsuresh
2 Comments
 
LVL 1

Author Comment

by:akashsuresh
ID: 37801186
Please note it is a class level annotation I am talking about and not a method.
0
 
LVL 35

Accepted Solution

by:
mccarl earned 500 total points
ID: 37804056
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.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
split string containing \r\n in Java 46 38
Kill default webkit margin!  Please! 6 22
windows explorer path to command prompt 5 29
MySQL  on Tomcat 8 24
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now