((AbstractLogEnabled)rval).enableLogging(getLogger());
}
}
catch (ExceptionInInitializerError e)
{
throw new CannotCreateElementProcessorException(
"an exception (" + e
+ ")occurred in initializing the associated ElementProcessor class");
}
catch (IllegalArgumentException e)
{
throw new CannotCreateElementProcessorException(
"the ElementProcessor constructor apparently needs parameters");
}
catch (InstantiationException e)
{
throw new CannotCreateElementProcessorException(
"associated ElementProcessor is an interface or abstract class");
}
catch (IllegalAccessException e)
{
throw new CannotCreateElementProcessorException(
"cannot access ElementProcessor class or its zero-parameter constructor");
}
catch (InvocationTargetException e)
{
throw new CannotCreateElementProcessorException(
"ElementProcessor constructor threw an exception ["
+ e.toString() + "]");
}
catch (ClassCastException e)
{
throw new CannotCreateElementProcessorException(
"object created does not implement ElementProcessor");
}
if (rval == null)
{
throw new CannotCreateElementProcessorException(
"somehow generated a null ElementProcessor");
}
return rval;
}