commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Waldrop <>
Subject Introspection help needed
Date Tue, 30 Jul 2002 20:36:19 GMT
     I have a class with a static method that
I would like to call from BeanUtils.populate().  It
will not work.  I've traced through the source and the
problem is that PropertyUtils.getPropertyDescriptors()

returns a blank object inevitably causing
BeanUtils.setProperty(Object, String, Object) to
return before calling the bean set method.
     Apparently, I could create a BeanInfo object and
try to load it up, but would rather have this work
outright.  Does anyone know if I'm making a mistake

See similar source below.  setMessage() does not get
called for property "message".  setAppendMessage()
get called for property "appendMessage" .

Also, has anyone had any trouble using populate() on
final classes?


--bob w.

package configurator.tests;

public class Final{

	static String message = "HOWDY";

	public static void setMessage(String msg){
		message = msg;

	public void setAppendMessage(String msg){
		message = message + msg;

	public static void printMessage(){
		System.out.println("Messaging: " + message);

Do You Yahoo!?
Yahoo! Health - Feel better, live better

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message