private static Platform determinePlatform() { String providerName = System.getProperty("jnr.ffi.provider"); try { Class c = Class.forName(providerName + "$Platform"); return (Platform) c.newInstance(); } catch (ClassNotFoundException ex) { return determinePlatform(determineOS()); } catch (IllegalAccessException ex) { throw new ExceptionInInitializerError(ex); } catch (InstantiationException ex) { throw new ExceptionInInitializerError(ex); } }
private static Platform determinePlatform() { String providerName = System.getProperty("jnr.ffi.provider"); try { Class c = Class.forName(providerName + "$Platform"); return (Platform) c.newInstance(); } catch (ClassNotFoundException ex) { return determinePlatform(determineOS()); } catch (IllegalAccessException ex) { throw new ExceptionInInitializerError(ex); } catch (InstantiationException ex) { throw new ExceptionInInitializerError(ex); } }
private static Platform determinePlatform() { String providerName = System.getProperty("jnr.ffi.provider"); try { Class c = Class.forName(providerName + "$Platform"); return (Platform) c.newInstance(); } catch (ClassNotFoundException ex) { return determinePlatform(determineOS()); } catch (IllegalAccessException ex) { throw new ExceptionInInitializerError(ex); } catch (InstantiationException ex) { throw new ExceptionInInitializerError(ex); } }