lundi 15 octobre 2018

Instantiate Fields Dynamically in an User defined object

Need to create an object dynamically using the field names passed in the method parameter.

Something like..

public void createDisplay(List<String> fields) {
//fetch fields names
//create an object in java using the fields passed
//assign values to the dynamically created fields.
}

Or

public void createDisplay(Schema schema) {
//create an object in java using the schema
//assign values to the dynamically created fields.
}

Can anyone help.





Aucun commentaire:

Enregistrer un commentaire