// for Talend Open Studio
Class cls = Class.forName(input_row.getClass().getName());
Class clsOut = Class.forName(output_row.getClass().getName());
Field fieldlist[] = cls.getDeclaredFields();
Field fieldlistOut[] = clsOut.getDeclaredFields();
for (int i = 0; i < fieldlist.length; i++) {
Field fld = fieldlist[i];
Field fldOut = fieldlistOut[i];
int mod = fld.getModifiers();
if ( Modifier.toString(mod).equals("public")) {
if ( fld.getType().getName().equals("java.lang.String") ) {
fldOut.set(output_row, "\"" + fld.get(input_row) + "\"");
} else {
fldOut.set(output_row, fld.get(input_row));
}
}
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.