Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Method call in super class within an around advice

Hi,

I'm new to AspectJ - so I hope this is not a silly question!

The original question is: is there a way to call methods in super-classes within an "around"-advice? If yes, how? ;)

I created a named PointCut using a certain parameter list to make them available in the advice context later:

pointcut logAbstractGenerationContext(String type, String name, Map params, AbstractGenerationContext abstractGenCtx) :
                execution(public Printable de.subpackage.subpackage.generate.AbstractGenerationContext+.getTemplate(String, String, Map) throws IOException) &&
                args(type, name, params) && this(abstractGenCtx);


The advice is defined as follows:

Printable around(String type, String name, Map params, AbstractGenerationContext abstractGenCtx) throws IOException : logAbstractGenerationContext(type, name, params, abstractGenCtx) {
    ...        
    if(type == null)
        return super.getTemplate(null, name, params);
    ...
}

But the parser always marks the "super" variable. I already tried some flavors - but still no success.

Hint: the aspect has been declared "privileged" to allow access on private or protected variables of the provided "AbstractGenerationContext" instance.

Maybe, you can help me to solve that (easy) problem?
-- 
----------------------------
e-mail:
HolgerKing@xxxxxxx

address:
Eckenhofstr. 36
78713 Schramberg
Germany

call:
+49/(0) 74 22/5 34 93
----------------------------

GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01


Back to the top