/** * Provides the current platform. * * @param platforms the platform factory * @return the current platform */ public Platform provide(Platforms platforms) { return platforms.getCurrentPlatform(); } }
/** * Returns the platform for the specified operating system name and architecture. * <p/> * This may query the underlying OS to determine the platform name. * * @param name the operating system name * @param arch the operating system architecture, or symbolic architecture * @return the corresponding platform */ public Platform getCurrentPlatform(String name, String arch) { return getCurrentPlatform(name, arch, null); }
/** * Returns the current platform given the operating system name, architecture and version. * <p/> * This may query the underlying OS to determine the platform name. * * @param name the operating system name * @param arch the operating system architecture, or symbolic architecture * @param version the operating system version. May be {@code null} * @return the corresponding platform */ public Platform getCurrentPlatform(String name, String arch, String version) { return getCurrentPlatform(name, arch, version, null); }
/** * Returns the current platform. * <p/> * This may query the underlying OS to determine the platform name. * * @return the current platform */ public Platform getCurrentPlatform() { return getCurrentPlatform(System.getProperty(OsVersionConstants.OSNAME), System.getProperty(OsVersionConstants.OSARCH), System.getProperty(OsVersionConstants.OSVERSION), System.getProperty("java.version")); }
Platform platform = platforms.getCurrentPlatform(); TargetFactory factory = new TargetFactory(new DefaultTargetPlatformFactory(dummy, platform, platforms)); Librarian librarian = new Librarian(factory, new Housekeeper());
if (runOn != null) Platform platform = new Platforms().getCurrentPlatform(); boolean found = false; for (Platform.Name name : runOn.value())