Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Advice on repeated annotations in Java 6 and 7 (not 8)

Hi List,

I'm a bit new to AspectJ, so bear with me :-)

I've created a Log annotation on which I weave a LogAspect with @Around.
This all works wonderfully.

However, I would like to do something like the following:


public @interface Logs {
    Log[] value();
}

@Logs({
    @Log(type = LogLevel.PROFILE, tag = "foo"),
    @Log(type = LogLevel.INFO, message = "Logging for introduce")
})
public static void introduce() { ...


And I'm uncertain as to how to proceed. Essentially: I suppose I need to
have an Aspect that triggers on @Logs, which would then handle or pass
on all @Log it encounters.

Any pointers and insights much appreciated!


Rubin Simons.


Back to the top