// Attempt to load the Log implementation class
Class logClass = null;
try {
logClass = loadClass(logClassName);
if (logClass == null) {
throw new LogConfigurationException
("No suitable Log implementation for " + logClassName);
}
if (!Log.class.isAssignableFrom(logClass)) {
throw new LogConfigurationException
("Class " + logClassName + " does not implement Log");
}
} catch (Throwable t) {
throw new LogConfigurationException(t);
}
// Identify the <code>setLogFactory</code> method (if there is one)
try {
logMethod = logClass.getMethod("setLogFactory",
logMethodSignature);
} catch (Throwable t) {
logMethod = null;
}
// Identify the corresponding constructor to be used
try {
logConstructor = logClass.getConstructor(logConstructorSignature);
return (logConstructor);
} catch (Throwable t) {
throw new LogConfigurationException
("No suitable Log constructor " +
logConstructorSignature+ " for " + logClassName, t);
}
}