I'm getting closer and closer...<br><br>It won't find my methods when they're private, but <FONT FACE=monospace>getDeclaredMethod()</font> is supposed to do that... anybody have any clues as to where I can go from here?<br><FONT FACE=monospace><br> SecurityManager sm = new SecurityManager();<br> sm.checkPermission(new ReflectPermission("suppressAccessChecks");<br> sm.checkPermission(new RuntimePermission("accessDeclaredMembers");<br> System.setSecurityManager(sm);<br><br> // grant access to get/set methods<br> <br> Class c = o.getClass().getMethod("get"+key, null).getReturnType();<br> Class[] parameterFiller={c};<br> Method mSet = propMethod(o.getClass(), key, parameterFiller);<br> mSet.setAccessible(true);</font><br><br>=======================================================================<FONT FACE=monospace><br><br> private static Method propMethod (Class c, String key, Class[] parameterFiller) {<br> try {<br> return c.getDeclaredMethod("set"+key, parameterFiller);<br> } catch (NoSuchMethodException e) {<br> return propMethod (c.getSuperclass(), key, parameterFiller);<br> }</font><br><br><br>=======================================================================<br><br>if anybody can help me go from here... propMethod will never find the right method, even though I know it exists. If there's any code here you don't understand, just let me know, I'll explain... I'm in a rush at the moment, sorry.<br><br>Thanks all...<br> <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence."
light the world, and bring depth to the silence."