Tabnine Logo
OS.isOs
Code IndexAdd Tabnine to your IDE (free)

How to use
isOs
method
in
org.apache.commons.exec.OS

Best Java code snippets using org.apache.commons.exec.OS.isOs (Showing top 5 results out of 315)

origin: org.apache.commons/commons-exec

/**
 * Determines if the OS on which Ant is executing matches the given OS name.
 * 
 * @param name
 *            the OS name to check for
 * @return true if the OS matches
 */
public static boolean isName(final String name) {
  return isOs(null, name, null, null);
}
origin: org.apache.commons/commons-exec

/**
 * Determines if the OS on which Ant is executing matches the given OS
 * architecture.
 * 
 * @param arch
 *            the OS architecture to check for
 * @return true if the OS matches
 */
public static boolean isArch(final String arch) {
  return isOs(null, null, arch, null);
}
origin: org.apache.commons/commons-exec

/**
 * Determines if the OS on which Ant is executing matches the given OS
 * version.
 * 
 * @param version
 *            the OS version to check for
 * @return true if the OS matches
 */
public static boolean isVersion(final String version) {
  return isOs(null, null, null, version);
}
origin: org.apache.commons/commons-exec

/**
 * Determines if the OS on which Ant is executing matches the given OS
 * family. * Possible values:<br />
 * <ul>
 * <li>dos</li>
 * <li>mac</li>
 * <li>netware</li>
 * <li>os/2</li>
 * <li>tandem</li>
 * <li>unix</li>
 * <li>windows</li>
 * <li>win9x</li>
 * <li>z/os</li>
 * <li>os/400</li>
 * </ul>
 * 
 * @param family
 *            the family to check for
 * @return true if the OS matches
 */
private static boolean isFamily(final String family) {
  return isOs(family, null, null, null);
}
origin: ch.racic.testing/TestFrameworkHelper

@Override
protected void runChild(final FrameworkMethod method, RunNotifier notifier) {
  Description description = describeChild(method);
  if (method.getAnnotation(Ignore.class) != null) {
    notifier.fireTestIgnored(description);
  } else if (method.getAnnotation(TargetOS.class) != null) {
    final TargetOS tos = method.getAnnotation(TargetOS.class);
    String name = tos.name().equals("") ? null : tos.name();
    String arch = tos.arch().equals("") ? null : tos.arch();
    String version = tos.version().equals("") ? null : tos.version();
    if (OS.isOs(tos.family(), name, arch, version)) {
      runLeaf(methodBlock(method), description, notifier);
    } else {
      notifier.fireTestIgnored(description);
    }
  } else {
    runLeaf(methodBlock(method), description, notifier);
  }
}
org.apache.commons.execOSisOs

Javadoc

Determines if the OS on which Ant is executing matches the given OS family, name, architecture and version

Popular methods of OS

  • isFamilyWindows
  • isFamilyMac
  • isFamilyUnix
  • isFamily
    Determines if the OS on which Ant is executing matches the given OS family. * Possible values: * do
  • isFamilyDOS
  • isFamilyOpenVms
  • isFamilyWin9x

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • getResourceAsStream (ClassLoader)
  • requestLocationUpdates (LocationManager)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now