if (jdoFileNames != null && !jdoFileNames.isEmpty()) {
final StringBuffer s = new StringBuffer();
for (Iterator i = jdoFileNames.iterator(); i.hasNext();) {
s.append(" " + i.next());
}
final ResourceLocator jdos
= new ListResourceLocator(out, verbose, jdoFileNames);
//printMessage(getI18N("enhancer.metadata.using_jdo_files",
// s.toString()));
locators.add(jdos);
}
// create resource locator for specified jar files
if (jarFileNames != null && !jarFileNames.isEmpty()) {
final StringBuffer s = new StringBuffer();
final Iterator i = jarFileNames.iterator();
s.append(i.next());
while (i.hasNext()) {
s.append(File.pathSeparator + i.next());
}
final PathResourceLocator jars
= new PathResourceLocator(out, verbose, s.toString());
//printMessage(getI18N("enhancer.metadata.using_jar_files",
// s.toString()));
locators.add(jars);
classLoader = jars.getClassLoader();
}
// create resource locator for specified source path
if (sourcePath != null && sourcePath.length() > 0) {
final PathResourceLocator path
= new PathResourceLocator(out, verbose, sourcePath);
//printMessage(getI18N("enhancer.metadata.using_source_path",
// sourcePath));
locators.add(path);
classLoader = path.getClassLoader();
}
if (classLoader == null) {
// use the current class loader as the default, if there is
// no -s option and no archives specified.
classLoader = EnhancerMetaDataJDOModelImpl.class.getClassLoader();
}
// print warning if no meta-data source specified
if (locators.isEmpty()) {
printWarning(getI18N("enhancer.metadata.using_no_metadata"));
}
// create JavaModel with combined resource locators
final ResourceLocator locator
= new CombinedResourceLocator(out, verbose, locators);
//^olsen: wrap with timing jdo file locator
//if (options.doTiming.value) {
// classLocator = new ResourceLocatorTimer(classLocator);
//}