I am using ITDs. Its reusable but I am not sure why you ask that as aren't all libraries designed to be reused?
The ITDs mostly introduce methods and field to types. No introduction of parents or an interface. The reason I asked this question is because when I try to code my classes in the aspects project (which has both the aspects the client will use to enhance their classes and new classes I am providing to the client that should be enhanced as well) the eclipse editor flags the ITD methods in the classes as not present and they don't compile. Its almost as if the methods introduced in the ITD are not visible to the classes in the same project the ITDs are declared in. Downstream, in dependent libraries, everything is fine of course. >From your comments, are you saying that classes I write in the same project that the aspects are declared in SHOULD see the enhanced methods? It kindof feels like a circular java build class path thing but I was expecting it to work of course since classes in the same project (without aspect) can see each other within the same project. Message: 2 Date: Tue, 13 Jul 2010 10:10:37 -0700 From: Andy Clement <[email protected]> Subject: Re: [aspectj-users] aspects in my aspects project and classes in the same project need to use those introduced methods, how to do this? To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset=ISO-8859-1 I guess you mean the aspects are using intertype declarations. To support your basic use case, sounds like you can just keep everything in one project. However, if you are building a reusable library and the initial target classes shouldn't be included, you will need to split the projects. However - intertype declarations create a strong coupling between the aspect and the target which can make this tricky to set up. What kinds of intertype are you doing? Are you intertyping onto an interface then using declare parents to apply that interface? Andy On 9 July 2010 06:59, <[email protected]> wrote: > I have a project, called MyAspects. It contains several aspects. It also contains classes. Those classes need to use the public methods introduced by those aspects. > > How do you setup the project to do this? Do I have to setup 2 projects and keep my aspects in one project and everything else in another? > > The output should ideally be a library that clients use to potentially introduce the aspects to their types as well as use the aspectj-enhanced classes directly. > _______________________________________________ _______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
