Object tool;
try {
tool = toolFactory.createTool();
} catch (Exception ex) {
throw new PullException("Could not create tool: \"" + name + "\"", ex);
}
if (getLogger().isDebugEnabled()) {
getLogger().debug("Pulled tool: {} = {}", name, tool);
}
return encode(tool);
}
// ���������toolsInSet�У���pull֮��
ToolSetInfo<ToolSetFactory> toolSetInfo = toolsInSet.get(name);
if (toolSetInfo != null) {
Object tool;
try {
tool = toolSetInfo.getFactory().createTool(name);
} catch (Exception ex) {
throw new PullException("Could not create tool: \"" + toolSetInfo.getToolSetName() + "." + name
+ "\"", ex);
}
if (getLogger().isDebugEnabled()) {
getLogger().debug("Pulled tool: {}.{} = {}",
new Object[] { toolSetInfo.getToolSetName(), name, tool });
}
return encode(tool);
}
// ���������toolsInRuntimeSet�У���pull֮��
pullToolsRuntime(name);
ToolSetInfo<RuntimeToolSetFactory> runtimeToolSetInfo = toolsInRuntimeSet.get(name);
if (runtimeToolSetInfo != null) {
Object tool;
try {
tool = runtimeToolSetInfo.getFactory().createTool(runtimeToolSetInfo.getTool(), name);
} catch (Exception ex) {
throw new PullException("Could not create tool: \"" + runtimeToolSetInfo.getToolSetName() + "."
+ name + "\"", ex);
}
if (getLogger().isDebugEnabled()) {
getLogger().debug("Pulled tool: {}.{} = {}",