com.mucommander.runtime
Class OsFamily

java.lang.Object
  extended by com.mucommander.runtime.RuntimeProperty
      extended by com.mucommander.runtime.OsFamily
All Implemented Interfaces:
OsFamilies

public class OsFamily
extends RuntimeProperty
implements OsFamilies

This class represents a non-versioned family of operating system, like Windows or Linux. The current runtime instance is determined using the value of the os.name system property.

Author:
Maxence Bernard
See Also:
OsFamilies, OsVersion

Field Summary
 
Fields inherited from class com.mucommander.runtime.RuntimeProperty
stringRepresentation
 
Fields inherited from interface com.mucommander.runtime.OsFamilies
AIX, FREEBSD, HP_UX, LINUX, MAC_OS_X, OPENVMS, OS_2, SOLARIS, UNKNOWN_OS_FAMILY, WINDOWS
 
Constructor Summary
protected OsFamily(java.lang.String stringRepresentation)
           
 
Method Summary
static OsFamily getCurrent()
          Returns the OS family of the current runtime environment.
protected  RuntimeProperty getCurrentValue()
          Returns the current runtime environment's value of this runtime property.
static java.lang.String getRawSystemProperty()
          Returns the value of the system property which serves to detect the OS family at runtime.
static void init()
          Determines the current value by parsing the corresponding system property.
 boolean isUnixBased()
          Returns true if this OS family is UNIX-based.
 
Methods inherited from class com.mucommander.runtime.RuntimeProperty
isCurrent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OsFamily

protected OsFamily(java.lang.String stringRepresentation)
Method Detail

init

public static void init()
Determines the current value by parsing the corresponding system property. This method is called automatically by this class the first time the current value is accessed. However, this method has been made public to allow to force the initialization if it needs to happen at a predictable time.


getCurrent

public static OsFamily getCurrent()
Returns the OS family of the current runtime environment.

Returns:
the OS family of the current runtime environment

isUnixBased

public boolean isUnixBased()
Returns true if this OS family is UNIX-based. The following OS families are considered UNIX-based:

Returns:
true if the current OS is UNIX-based

getRawSystemProperty

public static java.lang.String getRawSystemProperty()
Returns the value of the system property which serves to detect the OS family at runtime.

Returns:
the value of the system property which serves to detect the OS family at runtime.

getCurrentValue

protected RuntimeProperty getCurrentValue()
Description copied from class: RuntimeProperty
Returns the current runtime environment's value of this runtime property.

Specified by:
getCurrentValue in class RuntimeProperty
Returns:
the current runtime environment's value of this runtime property


This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard