(File selectedFile,
String callbackMethod,
Object callbackObject)
| 5922 | |
| 5923 | |
| 5924 | static public void selectCallback(File selectedFile, |
| 5925 | String callbackMethod, |
| 5926 | Object callbackObject) { |
| 5927 | try { |
| 5928 | Class<?> callbackClass = callbackObject.getClass(); |
| 5929 | Method selectMethod = |
| 5930 | callbackClass.getMethod(callbackMethod, File.class); |
| 5931 | selectMethod.invoke(callbackObject, selectedFile); |
| 5932 | |
| 5933 | } catch (IllegalAccessException iae) { |
| 5934 | System.err.println(callbackMethod + "() must be public"); |
| 5935 | |
| 5936 | } catch (InvocationTargetException ite) { |
| 5937 | ite.printStackTrace(); |
| 5938 | |
| 5939 | } catch (NoSuchMethodException nsme) { |
| 5940 | System.err.println(callbackMethod + "() could not be found"); |
| 5941 | } |
| 5942 | } |
| 5943 | |
| 5944 | |
| 5945 | ////////////////////////////////////////////////////////////// |
no test coverage detected