DBMethod method;
Node programNode = getProgramNode();
Node methodNode = getMethodNode();
DBObjectType methodObjectType = methodNode.getType();
if (programNode != null) {
DBProgram program = schema.getProgram(programNode.getName());
if (program == null || program.getObjectType() != programNode.getType()) return null;
method = program.getMethod(methodNode.getName(), overload);
} else {
method = schema.getMethod(methodNode.getName(), methodObjectType.getName(), overload);
}
return method != null && method.getObjectType() == methodObjectType ? (T) method : null;