General purpose Object property setter. Clients repeatedly invokes
setProperty(name,value) in order to invoke setters
on the Object specified in the constructor. This class relies on the
JavaBeans Introspector to analyze the given Object Class using
reflection.
will cause the invocations anObject.setName("Joe"), anObject.setAge(32),
and setMale(true) if such methods exist with those signatures.
Otherwise an IntrospectionException are thrown.
Usage:
PropertySetter ps = new PropertySetter(anObject); ps.set("name", "Joe"); ps.set("age", "32"); ps.set("isMale", "true");will cause the invocations anObject.setName("Joe"), anObject.setAge(32), and setMale(true) if such methods exist with those signatures. Otherwise an IntrospectionException are thrown.