Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Re: Load-Time Weaving configuration



Martin,

>For my subclass of ConcreteName (which works now pretty well) I am using
>the system class loader to load the class object if the class package
>starts with java oder javax.

To ensure bytecode is loaded for classes defined by the weaving class
loader (to avoid recursion in the weaver?) using class name seems a little
fragile. Why not use "Class.forName(className,false,loader.getParent())"
where loader is the weaving class loader? This ensures we use a
ConcreteName for all classes defined by parent loaders not just a subset of
bootstrap classes?

>In my Eclipse LTW implementataion the aspectpath configuration is a
>completely different thing. I am using the extension point mechanism of
>Eclipse to let plugins promote aspects. The LTW plugin for the Eclipse
>runtime reads all extensions of this extension point. Having the aspects
>being defined in extensions I can use the same mechanism as mentioned
>above to load the bytecode of the aspects (getResource via the bundle).
>Then the bytecode stream is passed to a ClassParser to create an object
>of type JavaClass. This is added to the world via "addSourceObjectType"
>and to the weaver via "addLibraryAspect" (only the name).

So what does your extension interface look like? Does it take the form of a
query e.g "getAspectNames()" which the extension point calls for each
implementation?

Cheers

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/



Back to the top