Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] AspectJ WeavingAdaptor Question: a feature request or intentionally left off?

Without looking at the source (I'm disconnected at the moment) this sounds 
like a reasonable request to me. Strictly the weaver may need up to three 
paths in order for it to work: an inpath (types that will be woven into), 
a classpath (for resolving types - these will not be woven into), and an 
aspectpath (aspects). We could add a constructor that takes all three and 
allow null or an empty list in any position. Please raise an enhancement 
request on bugzilla to cover this change and we can use it to track 
resolution.

Thanks, Adrian.

-- Adrian
Adrian_Colyer@xxxxxxxxxx



"Larry Zhou" <lzhou@xxxxxxxxxx> 
Sent by: aspectj-users-admin@xxxxxxxxxxx
13/09/2004 20:14
Please respond to
aspectj-users@xxxxxxxxxxx


To
<aspectj-users@xxxxxxxxxxx>
cc

Subject
[aspectj-users] AspectJ WeavingAdaptor Question: a feature request or 
intentionally left off?








Hi, 

I have checked feature request list, it doesn't seem to have this one.

I want to use WeavingAdaptor directly from my project, but I don't
bother classLoader at all.

Currently, I just copied WeavingAdaptor.java in my project, rename is as
AspectJWeavingAdaptor.java, and made an extra constructor, like this

                 public AspectJWeavingAdaptor (List classPath, List 
aspectPath) {
                                 init(classPath, aspectPath);
                 }

So far, it works great for me. I am happy with what I have right now.

To make it even better, since it is mostly a copy from original
WeavingAdaptor,
Is it possible to make an extra constructor in AspectJ's
WeavingAdaptor.java? So I can get rid of my wrapper file
AspectJWeavingAdaptor completely, aslo I can take advantage of any
enhancement there.

I understand that I don't use classloader at all, I only need the
functionality of load-time weaving. Here is how I use it:

           in my constructor:
                                     adaptor = new 
AspectJWeavingAdaptor(classList,
aspectList);

           in real code:
                new_bytecode = adaptor.weaveClass(className,
old_bytecode);


To me, in order for weaver to work, it only needs classPath and
aspectPath, nothing more. Was there any reason that it is still not
there?


Thanks a lot,

Larry

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users




Back to the top