com.plumtree.uiinfrastructure.util
Class Platform

java.lang.Object
  extended by com.plumtree.uiinfrastructure.util.Platform

public class Platform
extends java.lang.Object

Enumerated ordinal type for platform. Includes VM specifiers. DAP TODO: Obviously this class should have a static method that selects the appropriate instance of itself from the list based on VM and OS data, easily gathered from XPSystem (note that JRockit can be detected because of its unique implementation of UrlFactory, as can Jikes)

Author:
DavidP

Field Summary
static Platform AIX32
           
static Platform ALL
           
static Platform DOTNET
           
static Platform HPUX
           
static Platform JAVA
           
static Platform LINUX32_REDHAT
           
static Platform LINUX32_REDHAT_JROCKIT
           
static Platform LINUX32_SUSE
           
static Platform LINUX32_SUSE_JROCKIT
           
static Platform LINUX64_REDHAT
           
static Platform LINUX64_REDHAT_JROCKIT
           
static Platform LINUX64_SUSE
           
static Platform LINUX64_SUSE_JROCKIT
           
 int m_id
           
 java.lang.String m_name
           
static Platform MAC
           
static Platform MACOSX
           
static Platform[] platformList
           
static Platform SOLARIS32_SUNJVM
           
static Platform SOLARIS32_X86_SUNJVM
           
static Platform UNIDENTIFIED_UNIX
           
static Platform WIN32_DOTNET
           
static Platform WIN32_JAVA
           
static Platform WIN32_X64_DOTNET
           
static Platform WIN32_X64_JAVA
           
 
Method Summary
static Platform getCurPlatform()
          Determine the current platform we are running on.
 java.lang.String getName()
           
static Platform getPlatform(int id)
          Determines platform by ID.
 boolean isAIX()
          Determines platform flavor
 boolean isCurrentPlatformSupported()
          Checks for whether or not this platform is supported.
 boolean isDotnet()
          Determines platform flavor
 boolean isHPUX()
          Determines platform flavor
 boolean isIbmVM()
          Checks vm vendor
 boolean isJava()
          Determines platform flavor
 boolean isJRockitVM()
          Checks vm vendor
 boolean isLinux()
          Determines platform flavor
 boolean isMacOSX()
          Determines platform flavor
static boolean isPlatformAnyDotnet(Platform platform)
          Determines platform flavor, static helper.
static boolean isPlatformAnyJava(Platform platform)
          Determines platform flavor, static helper.
 boolean isSolaris()
          Determines platform flavor
 boolean isSunVM()
          Checks vm vendor
 boolean isWindows()
          Determines platform flavor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_id

public int m_id

m_name

public java.lang.String m_name

ALL

public static final Platform ALL

JAVA

public static final Platform JAVA

DOTNET

public static final Platform DOTNET

WIN32_DOTNET

public static final Platform WIN32_DOTNET

WIN32_JAVA

public static final Platform WIN32_JAVA

LINUX32_SUSE

public static final Platform LINUX32_SUSE

LINUX32_REDHAT

public static final Platform LINUX32_REDHAT

AIX32

public static final Platform AIX32

SOLARIS32_SUNJVM

public static final Platform SOLARIS32_SUNJVM

SOLARIS32_X86_SUNJVM

public static final Platform SOLARIS32_X86_SUNJVM

LINUX32_REDHAT_JROCKIT

public static final Platform LINUX32_REDHAT_JROCKIT

LINUX32_SUSE_JROCKIT

public static final Platform LINUX32_SUSE_JROCKIT

MAC

public static final Platform MAC

MACOSX

public static final Platform MACOSX

HPUX

public static final Platform HPUX

LINUX64_SUSE

public static final Platform LINUX64_SUSE

LINUX64_REDHAT

public static final Platform LINUX64_REDHAT

LINUX64_REDHAT_JROCKIT

public static final Platform LINUX64_REDHAT_JROCKIT

LINUX64_SUSE_JROCKIT

public static final Platform LINUX64_SUSE_JROCKIT

WIN32_X64_DOTNET

public static final Platform WIN32_X64_DOTNET

WIN32_X64_JAVA

public static final Platform WIN32_X64_JAVA

UNIDENTIFIED_UNIX

public static final Platform UNIDENTIFIED_UNIX

platformList

public static Platform[] platformList
Method Detail

getPlatform

public static Platform getPlatform(int id)
Determines platform by ID.

Parameters:
id -
Returns:

getName

public java.lang.String getName()
Returns:
the name of the platform

isJava

public boolean isJava()
Determines platform flavor

Parameters:
platform -
Returns:

isDotnet

public boolean isDotnet()
Determines platform flavor

Parameters:
platform -
Returns:

isWindows

public boolean isWindows()
Determines platform flavor

Parameters:
platform -
Returns:

isLinux

public boolean isLinux()
Determines platform flavor

Parameters:
platform -
Returns:

isHPUX

public boolean isHPUX()
Determines platform flavor

Parameters:
platform -
Returns:

isMacOSX

public boolean isMacOSX()
Determines platform flavor

Parameters:
platform -
Returns:

isAIX

public boolean isAIX()
Determines platform flavor

Parameters:
platform -
Returns:

isSolaris

public boolean isSolaris()
Determines platform flavor

Parameters:
platform -
Returns:

isPlatformAnyJava

public static boolean isPlatformAnyJava(Platform platform)
Determines platform flavor, static helper.

Parameters:
platform -
Returns:

isPlatformAnyDotnet

public static boolean isPlatformAnyDotnet(Platform platform)
Determines platform flavor, static helper.

Parameters:
platform -
Returns:

getCurPlatform

public static Platform getCurPlatform()
Determine the current platform we are running on. Focus is on determining if this is supported.

Returns:
integer platform ID

isCurrentPlatformSupported

public boolean isCurrentPlatformSupported()
Checks for whether or not this platform is supported.

Returns:

isJRockitVM

public boolean isJRockitVM()
Checks vm vendor

Returns:

isSunVM

public boolean isSunVM()
Checks vm vendor

Returns:

isIbmVM

public boolean isIbmVM()
Checks vm vendor

Returns:



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.