Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Capturing annotations
Capturing annotations [message #590677] Wed, 26 October 2005 12:29
Benjamin Podszun is currently offline Benjamin PodszunFriend
Messages: 4
Registered: July 2009
Junior Member
Hi there.

New to AspectJ I did some basic examples and now I want to use it to solve
real problems ;)
For my current work I planned to tag some methods with annotations to
provide security checks without implementing those several times. Is this
a good practice at all?
First tests work so far, but I'd like to use the information in my
annotation for the advice. Example:

@Guarded("AdminsOnly")
public void whatever() {}

I can match this join point using call(@Guarded * *(..)), but I see no way
to access the string value (or other values) later.

before() : call(@Guarded * *(..)) {
// I want to access the annotation here..
}

Using Google I always end up with the annotation-based way of using
AspectJ, the only usable info was http://ramnivas.com/blog/index.php?p=10
- but that's only a proposal and over a year old.

Can anyone lend me a helping hand here and tell me if it's a)
viable/okay/good practice to do what I plan to do here and b) how one is
supposed to access annotations of thisJoinPoint?

Thanks in advance,
Ben
Previous Topic:Problem symbols not shown in Package Explorer
Next Topic:Capturing annotations
Goto Forum:
  


Current Time: Thu Apr 25 04:11:17 GMT 2024

Powered by FUDForum. Page generated in 0.03718 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top