I see the following example code on how a Java Bean can be created dynamically. What I am not able to figure out is how I can update the state of an instance once created. So in the following example how can I set the value of foo to "footest" for instance bean?
BeanGenerator bg = new BeanGenerator();
bg.addProperty("foo", Double.TYPE);
bg.addProperty("bar", String.class);
Object bean = bg.create();
Thanks Kumar