Does anyone know of a way to get the names of variables from a bean. I want to write a class that creates spreadsheets from database queries, but I don't want to have to write it for each bean/table. I want to be able to pass in a list of beans and then do something like:
variables.getListVariableNames();
cell.setValue(variables.name());
cell.setValue(variables.name().getValue());
Am I just going to have to write some enums for each bean. If so can I do:
class.getValue(enumValue[0]);
if the enumValue[0] evaluates to lets say blah which is the name of a variable in class.
and have the enumValue be interpreted as the variable.
Amos
Computer Science
U of MO - Rolla
variables.getListVariableNames();
cell.setValue(variables.name());
cell.setValue(variables.name().getValue());
Am I just going to have to write some enums for each bean. If so can I do:
class.getValue(enumValue[0]);
if the enumValue[0] evaluates to lets say blah which is the name of a variable in class.
and have the enumValue be interpreted as the variable.
Amos
Computer Science
U of MO - Rolla