Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] LTW: Using an Aspect method in concrete-aspect declaration

Sorry, I meant "Using an Aspect pointcut" 


> Hi there,
> 
> I'm declaring a concrete-aspect in my aop.xml file ,
> but it doesn't seem to get registered. I don't see
> any
> concrete-aspect error or warning messages. I think
> it's not working because I'm defining the pointcut
> expression with an aspect method:
> 
> In aop.xml:
> ..
> ..
> 
> <concrete-aspect
> name="com.myco.aspects.AbstractAspectInstance"
> extends="com.myco.aspects.AbstractAspect">
>         <pointcut name="coverageAll"
>
expression="com.myco.aspects.coverage.TestCoverage.coverageA
> ll() &amp;&amp; within(com.sampleApp..*)"/>
> </concrete-aspect>
> 
> 
> I'm trying to track coverage for certain methods in
> an
> app, but want to configure the app package
> dynamically
> in the aop.xml. 
> 
> com.myco.aspects.coverage.TestCoverage2 contains
> pointcuts for standard method calls and looks like: 
> 
> package com.myco.aspects.coverage;
> 
> public aspect TestCoverage
> {
> 
> pointcut coverageInputStream() :
>         call(int InputStream+.read(..));
> 
> pointcut coverageOutputStream() :
>         call(OutputStream
> Process+.getOutputStream(..));
> 
> pointcut coverageAll() :
>       coverageInputStream() || 
>       coverageOutputStream();
> }
> 
> Is this way of defining concrete-aspects in aop.xml
> possible? 
> 
> I want to append the expression
> "within(com.sampleApp..*)", depending on the app I
> want to examine, dynamically in aop.xml instead of
> hard-coding it. 
> 
> Any help is appreciated. Thanks in advance. 
> 
> 
>  
> 
> 
>



 
____________________________________________________________________________________
TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/


Back to the top