| Re: [aspectj-dev] AspectJ implementation question: Additional Dependencies |
Hi Wes!
Can you say what you mean by "direct dependency"?Oh, sure. I think of a "direct dependency" if a class/interface is mentioned somewhere in the code of another class/interface. Because I am especially interested in the woven code we talk about the woven bytecode of a class and the compiled code of an aspect.
Hope that makes my question clearer. Sorry for the fuzzy topic. ;-)
-Martin
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
_______________________________________________ aspectj-dev mailing list aspectj-dev@xxxxxxxxxxx http://dev.eclipse.org/mailman/listinfo/aspectj-dev