private void invoke ( Method method , Object instance , Object [ ] params ) throws SlickXMLException { try { method . setAccessible ( true ) ; method . invoke ( instance , params ) ; } catch ( IllegalArgumentException e ) { throw new SlickXMLException ( "Failed to invoke: " + method + " for an XML attribute, is it valid?" , e ) ; } catch ( IllegalAccessException e ) { throw new SlickXMLException ( "Failed to invoke: " + method + " for an XML attribute, is it valid?" , e ) ; } catch ( InvocationTargetException e ) { throw new SlickXMLException ( "Failed to invoke: " + method + " for an XML attribute, is it valid?" , e ) ; } finally { method . setAccessible ( false ) ; } }
Call a method on a object