Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] newbie: weaving order or must method exist

hi all,

after reading through the docs, which are quite good, kudos, I have a
question regarding the order, in which ajc works its way through the
sources: (this question applies to ajc 1.1, which produces byte code ).

* Does ajc first compile 'normal' java classes and then analyses the
byte code or get the aspects weaven into the comipler data structures
(AST etc?)

this leads to the following question:

* if you use the around advice with a call pointcut, and you don't call 
proceed ( in that case the call gets replaced ), does the method of that
target class have to exist?

example:

class Foo {  }
class Client {
  void someMethod( ) {
    Foo f = new Foo( );
    f.callSomeNotExistingMethod( );
  }
    
}

so if you make an aspect around any call(*) on the target(Foo) does that
go through the compiler?
(sorry I am in the process of trying this out myself, but I thought I
additionally ask the experts right away )


thanks

-- Jakob Praher




Back to the top