Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Populate Complex Java Object using Reflection

 
sam kulkarni
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to populate a complex object using reflection.

e.g.

I need to populate Employee Class fields including Address fields.
What approach should I use? Is there any API available? cause it can be a multilevel hierarchy of POJO's.


Thanks in advance
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15272
37
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you can do things like that with Apache JXPath.
 
sam kulkarni
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It helped me!!!
Thanks a ton
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic