Hello,
yes that would work. Why don't we define the init method on the
BaseToolFactory,
then it could be called via theFactory.init?
Jörn
On 07/13/2012 03:04 PM, William Colen wrote:
Jörn,
Would it work?
public static BaseToolFactory create(String subclassName,
ArtifactProvider artifactProvider) throws InvalidFormatException {
// load the ToolFactory using the default constructor
BaseToolFactory theFactory = ExtensionLoader.instantiateExtension(
BaseToolFactory.class, subclassName);
if (theFactory != null) {
try {
// call the init method that takes a ArtifactProvider argument
Method init = theFactory.getClass().getDeclaredMethod("init",
ArtifactProvider.class);
init.invoke(theFactory, artifactProvider);
} catch
.....
}
}
return theFactory;
}
On Fri, Jul 13, 2012 at 9:01 AM, Jörn Kottmann <kottm...@gmail.com> wrote:
On 07/13/2012 01:47 PM, William Colen wrote:
I've been postponing working on the OSGi support for the BaseToolFactory,
I
am sorry.
I managed to have some free time this week, so I can do it right now if
you
didn't start it already.
Also, before releasing 1.5.3, I would like to have the factory mechanism
available in the Chunker. I will do it latter today.
Well, no hurry, I just had a look at the open issues for 1.5.3 and stumbled
over the OSGi support one.
I did it for the name finder, and wanted to hear opinions about my
proposed changed for the tool factory loading.
Jörn