Luciano Resende wrote:

>> I was thinking that Class loading would be the responsibility of the
>> ArtifactResolver. So, we wouldn't need a ClassLoader, we would call
>> ArtifactResolver.resolve() to get the Class, like for all other
>> artifacts resolved in an SCA contribution.
>

I have committed a change to allow ArtifactResolver to be used to resolve classes.

Here's how to use it to get a foo.Bar class:
ClassReference ref = new ClassReference("foo.Bar");
ClassReference resolved = resolver.resolve(ref);
Class clazz = resolved.getJavaClass();

The DefaultArtifactResolver constructor now takes a ClassLoader.

DefaultArtifactResolver and ClassReference use WeakReferences to ClassLoader and Class to avoid memory leaks.

--
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to