I use java 1.5. I am to create a common function which takes 2 objects (source class and target class) which call all getters and get all values from source object and, call setters of target object . My intention is to get all values from source object and set those values to target object . Both classes of parsing objects are different but all encapsulations are equal each other (variables, getters and setter methods are similar).
Here I am to use reflection and then, call getters and setter. As I know, using reflection arises performance and memory issues. Is there any way to come up this with only java without any other third party jars ? Any implementation, methodology to do this ? Any source, sample codes are highly appreciated.