This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

AspectJ Pointcut expression to intercept enum methods  RSS feed

 
Alon Cohen
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using AspectJ, I want to intercept every toString() invocation on an enum construct.

For example, Assuming GridVisible is an enum that does NOT implement toString():

GridVisible gv = GridVisible.FE;
return gv.toString();


I need an expression that intercepts the call to toString(). I figured that the correct expression would look something like:



That doesn't work. I also tried many kinds of combination, mainly using the calling(), $instanceof and $implementing expressions, but to no avail.

Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!