Class cmdClass = null;
try {
cmdClass = getClass().getClassLoader()
.loadClass(getClassName(name));
} catch (ClassNotFoundException e) {
throw new LookupException("Command named '" + name + "' not found.");
}
if (!ExecutableCommand.class.isAssignableFrom(cmdClass))
throw new LookupException("Class " + cmdClass.getName()
+ " must implement " + ExecutableCommand.class.getName());
return cmdClass;
}