I am using try to implement Logging using Spring AOP. I have defined the
@Pointcut(\"execution(* com.mycom..*(..))\
Currently you can exclude enums, aspects, interfaces, inner types, anonymous types via is()
pointcut syntax which was introduced in AspectJ 1.6.9, see also my answer here.
What you cannot do at the moment is exclude final types via AspectJ syntax. But I think it would make sense, so I created a ticket for it.
How to exclude enums:
@Pointcut("execution(* com.mycom..*(..)) && !within(is(EnumType))")
Update: AspectJ 1.8.4 has been released, see also overview in the official download section. On Maven Central the download is not available yet, but it will be soon, I guess. When available, this link will be valid, currently it yields a 404 error.
So why is this release interesting? Because the ticket mentioned above has been resolved and there is a new pointcut primitive is(FinalType)
available as of now, see 1.8.4 release notes.
So now the full solution you requested looks like this:
@Pointcut(
"execution(* com.mycom..*(..)) && " +
"!within(is(EnumType)) && " +
"!within(is(FinalType))"
)
I verified that it works like this.