private static NativeCalls getImplInstance() { if (Platform.isLinux()) { return new LinuxNativeCalls(); } if (Platform.isWindows()) { return new WinNativeCalls(); } if (Platform.isSolaris()) { return new SolarisNativeCalls(); } if (Platform.isMac()) { return new MacOSXNativeCalls(); } if (Platform.isFreeBSD()) { return new FreeBSDNativeCalls(); } return new POSIXNativeCalls(); }
static boolean isWindowsType() { if (Platform.isMac() || Platform.isFreeBSD() || Platform.isOpenBSD() || Platform.iskFreeBSD()) { return false; } else { return true; } } }
else if (Platform.isLinux() || Platform.isFreeBSD()) { if (isVersionedName(libName) || libName.endsWith(".so")) {
} else if (Platform.isLinux() || Platform.isSolaris() || Platform.isAIX() || Platform.isFreeBSD() || Platform.isNetBSD() || Platform.isOpenBSD() || Platform.iskFreeBSD()) {
if ((Platform.isLinux() || Platform.isFreeBSD() || Platform.isAIX()) && Platform.C_LIBRARY_NAME.equals(libraryName)) { libraryName = null;
else if (Platform.isLinux() || Platform.isFreeBSD()) {
LinkLayerAddress.getByAddress(ByteArrays.getSubArray(addr, 0, addrLength))); } else if ((Platform.isMac() || Platform.isFreeBSD() || Platform.isOpenBSD()) || Platform.iskFreeBSD() && sa_family == Inets.AF_LINK) { sockaddr_dl sdl = new sockaddr_dl(pcapAddr.addr.getPointer());
static boolean isWindowsType() { if (Platform.isMac() || Platform.isFreeBSD() || Platform.isOpenBSD() || Platform.iskFreeBSD()) { return false; } else { return true; } } }
private static String getClassPrefix() { return Platform.isWindows() ? "Win32" : Platform.isSolaris() ? "Sun" : (Platform.isMac() || Platform.isFreeBSD() || Platform.isOpenBSD()) ? "BSD" : "Unix"; }
@Override protected boolean couldHandleThisVirtualMachine() { final boolean result; if (isFreeBSD() || isLinux() || isOpenBSD() || isSolaris() || isMac()) { result = PROCESS_PID_FIELD != null; } else { result = false; } return result; }
private static String getClassPrefix() { return Platform.isWindows() ? "Win32" : Platform.isSolaris() ? "Sun" : (Platform.isMac() || Platform.isFreeBSD() || Platform.isOpenBSD()) ? "BSD" : "Unix"; }
private static String getClassPrefix() { return Platform.isWindows() ? "Win32" : Platform.isSolaris() ? "Sun" : (Platform.isMac() || Platform.isFreeBSD() || Platform.isOpenBSD()) ? "BSD" : "Unix"; }
private static String getNativeLibraryName() { String result; if (Platform.isMac()) { result = "libpty.dylib"; } else if (Platform.isWindows()) { result = "winpty.dll"; } else if (Platform.isLinux() || Platform.isFreeBSD() || Platform.isOpenBSD() || Platform.isAndroid()) { result = "libpty.so"; } else { throw new IllegalStateException("Platform " + Platform.getOSType() + " is not supported"); } return result; }
@NotNull static String getPlatformFolderName() { String result; if (Platform.isMac()) { result = "macosx"; } else if (Platform.isWindows()) { result = "win"; } else if (Platform.isLinux() || Platform.isAndroid()) { result = "linux"; } else if (Platform.isFreeBSD()) { result = "freebsd"; } else if (Platform.isOpenBSD()) { result = "openbsd"; } else { throw new IllegalStateException("Platform " + Platform.getOSType() + " is not supported"); } return result; }
public static JnaNativePty open(Attributes attr, Size size) throws IOException { if (Platform.isMac()) { return OsXNativePty.open(attr, size); } else if (Platform.isLinux()) { return LinuxNativePty.open(attr, size); } else if (Platform.isSolaris()) { return SolarisNativePty.open(attr, size); } else if (Platform.isFreeBSD()) { return FreeBsdNativePty.open(attr, size); } else { throw new UnsupportedOperationException(); } }
public static JnaNativePty current() throws IOException { if (Platform.isMac()) { return OsXNativePty.current(); } else if (Platform.isLinux()) { return LinuxNativePty.current(); } else if (Platform.isSolaris()) { return SolarisNativePty.current(); } else if (Platform.isFreeBSD()) { return FreeBsdNativePty.current(); } else { throw new UnsupportedOperationException(); } }
public static JnaNativePty current() throws IOException { if (Platform.isMac()) { return OsXNativePty.current(); } else if (Platform.isLinux()) { return LinuxNativePty.current(); } else if (Platform.isSolaris()) { return SolarisNativePty.current(); } else if (Platform.isFreeBSD()) { return FreeBsdNativePty.current(); } else { throw new UnsupportedOperationException(); } }
public static JnaNativePty open(Attributes attr, Size size) throws IOException { if (Platform.isMac()) { return OsXNativePty.open(attr, size); } else if (Platform.isLinux()) { return LinuxNativePty.open(attr, size); } else if (Platform.isSolaris()) { return SolarisNativePty.open(attr, size); } else if (Platform.isFreeBSD()) { return FreeBsdNativePty.open(attr, size); } else { throw new UnsupportedOperationException(); } }
private static CLibrary init() { if (Platform.isMac() || Platform.isOpenBSD()) { return (CLibrary) Native.loadLibrary("c", BSDCLibrary.class); } else if (Platform.isFreeBSD()) { return (CLibrary) Native.loadLibrary("c", FreeBSDCLibrary.class); } else if (Platform.isSolaris()) { return (CLibrary) Native.loadLibrary("c", SolarisCLibrary.class); } else if (Platform.isLinux()) { return (CLibrary) Native.loadLibrary("c", LinuxCLibrary.class); } else { return (CLibrary) Native.loadLibrary("c", CLibrary.class); } } }
private static CLibrary init() { if (Platform.isMac() || Platform.isOpenBSD()) { return (CLibrary) Native.loadLibrary("c", BSDCLibrary.class); } else if (Platform.isFreeBSD()) { return (CLibrary) Native.loadLibrary("c", FreeBSDCLibrary.class); } else if (Platform.isSolaris()) { return (CLibrary) Native.loadLibrary("c", SolarisCLibrary.class); } else if (Platform.isLinux()) { return (CLibrary) Native.loadLibrary("c", LinuxCLibrary.class); } else { return (CLibrary) Native.loadLibrary("c", CLibrary.class); } } }