mercredi 12 août 2015

How to access attributes of type List of Objects defined within a class Object using reflection in Java

Objective: I am trying to develop an Utility in Java 1.6 using reflection.

Problem Statement: I am unable to access attribute of type List of objects. My class sample class structure is as follows:

public class ParentBean extends ActionForm {
private int id;
private Collection classBList; // List of objects of type Class B

// getters and setters
}

public class ClassB extends ClassC {  
private long classBid;

// getters and setters
}

public class ClassC extends ActionForm {  
private String name;

// getters and setters
}





Aucun commentaire:

Enregistrer un commentaire