Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Java in General and the fly likes Populate Complex Java Object using Reflection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Populate Complex Java Object using Reflection" Watch "Populate Complex Java Object using Reflection" New topic
Author

Populate Complex Java Object using Reflection

sam kulkarni
Greenhorn

Joined: Mar 18, 2011
Posts: 12
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

Joined: Aug 16, 2005
Posts: 14074
    
  16

I think you can do things like that with Apache JXPath.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
sam kulkarni
Greenhorn

Joined: Mar 18, 2011
Posts: 12
It helped me!!!
Thanks a ton
 
 
subject: Populate Complex Java Object using Reflection
 
Similar Threads
How to update using Hibernate
In struts2 delete is not Working
Problem with refresh() method of EntityManamger in JPA
How to set default values in an spring form input?
Basic hibernate code explanation