private void ensureWindowsSupport(NativeFunction function) throws NativeAccessException { if (!hasWindowsSupport()) { throw new NativeAccessException("Native Windows Support plugin not installed"); } if (!nativeWindowsSupport.hasSupportFor(function)) { throw new NativeAccessException("Installed Native Windows Support plugin does not support " + function); } }