org.jruby.platform
Class Platform

java.lang.Object
  extended by org.jruby.platform.Platform

public class Platform
extends java.lang.Object

Platform specific constants.


Field Summary
static java.lang.String ARCH
           
static java.util.Map<java.lang.String,java.lang.String> ARCH_NAMES
           
static int BIG_ENDIAN
           
static int BYTE_ORDER
           
static boolean IS_BSD
           
static boolean IS_FREEBSD
           
static boolean IS_GCJ
           
static boolean IS_LINUX
           
static boolean IS_MAC
           
static boolean IS_OPENBSD
           
static boolean IS_SOLARIS
           
static boolean IS_WINDOWS
           
static java.lang.String JVM
           
static int LITTLE_ENDIAN
           
static java.lang.String NAME
           
static java.lang.String OS
           
static java.util.Map<java.lang.String,java.lang.String> OS_NAMES
           
 
Constructor Summary
protected Platform()
           
 
Method Summary
 java.lang.String getOSPackageName()
           
 java.lang.String getPackageName()
           
static Platform getPlatform()
           
static java.lang.String getProperty(java.lang.String property, java.lang.String defValue)
          An extension over System.getProperty method.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OS_NAMES

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

ARCH_NAMES

public static final java.util.Map<java.lang.String,java.lang.String> ARCH_NAMES

ARCH

public static final java.lang.String ARCH

OS

public static final java.lang.String OS

JVM

public static final java.lang.String JVM

IS_WINDOWS

public static final boolean IS_WINDOWS

IS_MAC

public static final boolean IS_MAC

IS_FREEBSD

public static final boolean IS_FREEBSD

IS_OPENBSD

public static final boolean IS_OPENBSD

IS_LINUX

public static final boolean IS_LINUX

IS_SOLARIS

public static final boolean IS_SOLARIS

IS_BSD

public static final boolean IS_BSD

NAME

public static final java.lang.String NAME

BIG_ENDIAN

public static final int BIG_ENDIAN
See Also:
Constant Field Values

LITTLE_ENDIAN

public static final int LITTLE_ENDIAN
See Also:
Constant Field Values

BYTE_ORDER

public static final int BYTE_ORDER

IS_GCJ

public static final boolean IS_GCJ
Constructor Detail

Platform

protected Platform()
Method Detail

getPlatform

public static Platform getPlatform()

main

public static void main(java.lang.String[] args)

getPackageName

public java.lang.String getPackageName()

getOSPackageName

public java.lang.String getOSPackageName()

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 © 2002-2009 JRuby Team. All Rights Reserved.