From: Nick C. <nic...@ve...> - 2002-06-26 16:25:41
|
Hi, Some background. I'm working with the repast simulation framework for creating agent based simulations. Typically you write your model in java, "load" it into repast and off it goes. Repast identifies and displays a models starting parameters by calling getInitParam on the model which returns a list of property names. (These are standard bean like properties where the presence of a get / set accesor method identifies a property. So, getVal and/or setVal "defines" the val property.) Repast takes this list of property names uses reflection to go find the appropriate methods in the model. So a property name of "val" makes repast look for a getVal and a setVal. What I'd like to be able to do is to write the models in jython. Everything seems to work fine as far as subclassing the repast base models with my jython code. However, although repast does call the appropriate method and receive the list of property names, it can't find the get/set accessor methods in my jython model. Short of compiling the jython into java and using the "@sig" comments, is there any way to get this kind of bean property reflection working on the jython side. thanks, Nick -- Nick Collier Social Science Research Computing University of Chicago http://repast.sourceforge.net |