Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] constructor problem in inner class

Andy Clement schrieb:
Hi Oliver,

        It just so happens I wrote a blog post about how the compiler
        handles private inner classes and it precisely explains what you
        are seeing.

        http://andrewclement.blogspot.com/ - see the article on
        "Compiler variation: javac and jdt"


    ah, thanx, now I understand why my aspect did not work as expected.
    But can I exclude constructors of inner classes? If yes, how?


I can't quickly think of a way - seems to be a missing facility (can anyone else think of a way? - i cant keep all this syntax in my brain) When I was writing the pointcut to try and do it, what I really wanted to write was:

execution(!nested new(..))

or perpaps:

execution(!SomeClass$InnerClass.new(..))

That's the way how the compiler translate it and what you'll see in the stacktrace. And it is not a new syntax.

Oliver


Back to the top