public void visit(SqlToplevelType sqlToplevelType) { listener.beginPackage("toplevel"); try { List<ProcedureMethod> declaredMethods = sqlToplevelType.getDeclaredMethods(); for (ProcedureMethod m : declaredMethods) { m.accept(this); } } catch (Exception e) { e.printStackTrace(); } listener.endPackage(); }
public void visit(ProcedureMethod method) { TypeClass[] paramTypes = method.getParamTypes(); int len = paramTypes.length; listener.beginMethod(method.getName(), len); SqlType returnType = (SqlType) method.getReturnType(); if (returnType != null) { listener.handleMethodReturn(returnType.getName()); returnType.accept(this); } String[] paramNames = method.getParamNames(); int[] paramModes = method.getParamModes(); for (int idx = 0; idx < len; idx++) { SqlType argType = (SqlType) paramTypes[idx]; int mode = paramModes[idx]; String modeStr = "IN"; if (mode == ProcedureMethod.OUT) { modeStr = "OUT"; } else if (mode == ProcedureMethod.INOUT) { modeStr = "INOUT"; } listener.beginMethodArg(paramNames[idx], modeStr, idx); argType.accept(this); listener.endMethodArg(paramNames[idx]); } listener.endMethod(method.getName()); }
public int compareTo(ProcedureMethod other) { return getSortingKey().compareTo(other.getSortingKey()); }