// iterate through the fields and deal with
Field[] fields = procClass.getFields();
for (Field f : fields) {
if (f.getType() == SQLStmt.class) {
// String fieldName = f.getName();
SQLStmt stmt = null;
try {
stmt = (SQLStmt) f.get(procInstance);
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
// add the statement to the catalog
Statement catalogStmt = procedure.getStatements().add(f.getName());
// compile the statement
try {
StatementCompiler.compile(compiler, hsql, catalog, db, estimates, catalogStmt, stmt.getText(), info.singlePartition);
} catch (VoltCompiler.VoltCompilerException e) {
e.printStackTrace();
String msg = shortName + "." + f.getName() + ": " + e.getMessage();
throw compiler.new VoltCompilerException(msg);
}