(File selectedFile,
String callbackMethod,
Object callbackObject)
| 6710 | |
| 6711 | |
| 6712 | static private void selectCallback(File selectedFile, |
| 6713 | String callbackMethod, |
| 6714 | Object callbackObject) { |
| 6715 | try { |
| 6716 | Class<?> callbackClass = callbackObject.getClass(); |
| 6717 | Method selectMethod = |
| 6718 | callbackClass.getMethod(callbackMethod, new Class[] { File.class }); |
| 6719 | selectMethod.invoke(callbackObject, new Object[] { selectedFile }); |
| 6720 | |
| 6721 | } catch (IllegalAccessException iae) { |
| 6722 | System.err.println(callbackMethod + "() must be public"); |
| 6723 | |
| 6724 | } catch (InvocationTargetException ite) { |
| 6725 | ite.printStackTrace(); |
| 6726 | |
| 6727 | } catch (NoSuchMethodException nsme) { |
| 6728 | System.err.println(callbackMethod + "() could not be found"); |
| 6729 | } |
| 6730 | } |
| 6731 | |
| 6732 | |
| 6733 |
no test coverage detected