org.jruby.ext.posix.util
Class Platform

java.lang.Object
  extended by org.jruby.ext.posix.util.Platform

public class Platform
extends java.lang.Object


Field Summary
static java.lang.String ARCH
           
static boolean IS_32_BIT
           
static boolean IS_64_BIT
           
static boolean IS_BSD
           
static boolean IS_FREEBSD
           
static boolean IS_LINUX
           
static boolean IS_MAC
           
static boolean IS_SOLARIS
           
static boolean IS_WINDOWS
           
static boolean IS_WINDOWS_20X
           
static boolean IS_WINDOWS_9X
           
static boolean IS_WINDOWS_NT
           
static boolean IS_WINDOWS_VISTA
           
static boolean IS_WINDOWS_XP
           
static java.lang.String OS_NAME
           
static java.lang.String OS_NAME_LC
           
static java.util.Map<java.lang.String,java.lang.String> OS_NAMES
           
 
Constructor Summary
Platform()
           
 
Method Summary
static java.lang.String envCommand()
           
static java.lang.String getOSName()
           
static java.lang.String getProperty(java.lang.String property, java.lang.String defValue)
          An extension over System.getProperty method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OS_NAME

public static final java.lang.String OS_NAME

OS_NAME_LC

public static final java.lang.String OS_NAME_LC

IS_WINDOWS

public static final boolean IS_WINDOWS

IS_WINDOWS_9X

public static final boolean IS_WINDOWS_9X

IS_WINDOWS_NT

public static final boolean IS_WINDOWS_NT

IS_WINDOWS_20X

public static final boolean IS_WINDOWS_20X

IS_WINDOWS_XP

public static final boolean IS_WINDOWS_XP

IS_WINDOWS_VISTA

public static final boolean IS_WINDOWS_VISTA

IS_MAC

public static final boolean IS_MAC

IS_FREEBSD

public static final boolean IS_FREEBSD

IS_LINUX

public static final boolean IS_LINUX

IS_SOLARIS

public static final boolean IS_SOLARIS

IS_BSD

public static final boolean IS_BSD

IS_32_BIT

public static final boolean IS_32_BIT

IS_64_BIT

public static final boolean IS_64_BIT

ARCH

public static final java.lang.String ARCH

OS_NAMES

public static final java.util.Map<java.lang.String,java.lang.String> OS_NAMES
Constructor Detail

Platform

public Platform()
Method Detail

envCommand

public static final java.lang.String envCommand()

getOSName

public static java.lang.String getOSName()

getProperty

public static java.lang.String getProperty(java.lang.String property,
                                           java.lang.String defValue)
An extension over System.getProperty method. Handles security restrictions, and returns the default value if the access to the property is restricted.

Parameters:
property - The system property name.
defValue - The default value.
Returns:
The value of the system property, or the default value.


Copyright © {inceptionYear}-2008 null. All Rights Reserved.