Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] cflowbelow and capturing context

Hello,

    I am trying to write a few point cuts and capture context and am
having trouble capturing the necessary context

    Capture the execution pointcut for the Calculation.getHealth JP
method invocation
    @Pointcut("execution(public java.util.List<metrics.Health>
metrics.Calculation.getHealth(metrics.AggregateInfo))")
    public void computationOfHealth() {
    }

    execution of any methods with the @Category annotation in the
cflowbelow computationOfHealth capture the annotation
    @Pointcut("execution(@Category * *(..)) &&
cflowbelow(computationOfHealth()) && @annotation(category)")
    public void category(Category category) {
    }

   Require help here-
   execution of any methods with the @RuleSet annotation in the
cflowbelow category
   I would like to capture the ruleset (and if possible) the Category annotation
   @Pointcut("execution(@RuleSet * *(..)) &&
cflowbelow(category(Category)) && @annotation(rs)")
    public void ruleset(RuleSet rs) {
    }

   I have tried a couple of different options

   Not what I want but worth a shot
   @Pointcut("execution(@RuleSet * *(..)) && @annotation(rs)")
   and
   @Pointcut("execution(@RuleSet * *(..)) &&
cflowbelow(category(Category)) && @annotation(rs)")
    with the error message
     [iajc] MessageHolder:  (6 weaveinfo)  (530 info)  (1 error)
     [iajc] [error   0]: error at
audit/AuditorPointcutCaptures.java::0 incompatible number of arguments
to pointcut, expected 1 found 0

     Assistance much appreciated.

Thanks
Bhaskar


Back to the top