mercredi 13 mai 2015

how to typecast the objects created by newInstance() method of reflection API in java dynamically

Public int createObjec(Object object,String className){

//object may be User,Role or UserRole // className is The Name of The Class

how can i create a and clone and typecast the object

sessionFactory.getCurrentSession().save(dynamicObject);//dynamic object may be User,Role or UserRole

}





Aucun commentaire:

Enregistrer un commentaire