Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] AspectJ implementation question: Additional Dependencies

Can you say what you mean by "direct dependency"?

i.e., is it a direct dependency if a class A can load and 
resolve, but when you run a method of A, class B is loaded 
and hence required?

If I remember correctly, for class A to load, it must be able
to resolve all types for its fields and method return and 
parameter types (and presumably any type used in the 
static initializer or the static initializer for a static 
field being dereferenced).  That means if there is a method
return type or parameter refering to the Aspect type, and 
the aspect type requires a particular type, that type would
be loaded when class A is loaded.

Or are you only saying there is a direct dependency if there
is a field or extends/implements relationship (hasa or isa)?

Wes

Martin Lippert wrote:
> 
> Hi!
> 
> I have a question regarding the compiling and implementation of the AspectJ
> language.
> 
> Lets imagine the following situation:
> I have a class A and an aspect B. The aspect B uses class C to do something.
> Aspect B affects class A in some way.
> 
> And now the question:
> Is there any possibility to implement the aspect B in a way that the compiler
> inserts an additional direct dependency from class A to class C? Or does the
> compiler insert new dependencies only from class A to aspect B (where aspect B
> still uses class C)?
> 
> For me the introduction features of AspectJ seems to allow the additional
> dependency but in the same way the AspectJ compiler implementation might compile
> and weave this differently (via delegation or something similar).
> 
> Thank you very much!!!
> 
> Best regards,
> Martin
> 
> ---
> Martin Lippert
> email: lippert@xxxxxxx
> 
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-dev


Back to the top