All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.wizards.core.Platform

java.lang.Object
   |
   +----com.sun.wizards.core.Platform

public class Platform
extends Object
implements Serializable
The Platform object determines if the platform that the java virtual machine is running on is compatible with the specified platform. The platform may be specified with a general os type (i.e. Windows or Unix), or by the specific os (i.e. Solaris), or even a specific cpu architecture (i.e. X86), or a combination (i.e. Solaris X86).


Variable Index

 o AIX
AIX Unix operating system by IBM.
 o ALL
This flag indicates that all values are acceptable.
 o ALPHA
Alpha cpu.
 o BE
Generic BE os.
 o BEOS
BE os by BE.
 o currentArch
A value indicating the runtime architecture.
 o currentOsName
A value indicating the runtime os name.
 o currentOsType
A value indicating the runtime os type.
 o currentVersion
A value indicating the runtime os version.
 o debugMode
A flag that indicates whether or not debug message should be printed.
 o DEC
DEC Unix
 o HPUX
HPUX Unix operating system by Hewlett Packard.
 o invertPlatform
A value indicating that the compatibility flag should be inverted.
 o IRIX
Irix by SGI
 o LINUX
Linux freeware Unix clone.
 o MAC
Generic Macintosh os.
 o MACOS
MacOS by Apple.
 o MIPS
MIPS Cpu
 o PARISC
HP's PA-RISC Archiecture
 o POWERPC
PowerPC
 o SCO
Santa Cruz Operation Unix.
 o SOLARIS
Solaris by Sun Microsystems, Inc.
 o SPARC
Sun sparc cpu.
 o specifiedAttributes
A flag indicating what platform identifiers to check compatibility against.
 o targetArch
A value indicating the target architecture.
 o targetOsName
A value indicating the target operating system name.
 o targetOsType
A value indicating the target operating system type.
 o targetVersion
A value indicating the target version.
 o UNIX
Generic Unix os.
 o WIN95
Windows 95 by Microsoft.
 o WINDOWS
Generic Windows os.
 o WINNT
Windows NT by Microsoft.
 o X86
Intel x86 series cpu.

Constructor Index

 o Platform(int)
This constructor specifies the target operating system type.
 o Platform(int, boolean)
This constructor specifies the target operating system type.
 o Platform(int, int, int)
This constructor specifies the target operating system name and/or the target cpu architecture.
 o Platform(int, int, int, String)
This constructor specifies the target operating system name and/or the target cpu architecture as well as the os version.
 o Platform(int, int, int, String, boolean)
This constructor specifies the target operating system name and/or the target cpu architecture as well as the version.

Method Index

 o equals(Object)
Determines if this platform object is equivalent to the specified platform object.
 o getArch(String)
Returns an id for the architecture, given the property string for the architecture.
 o getArchString(int)
Returns a String representation of the architecture identified by the specified id.
 o getOsName(String)
Returns an id for the os name, given the property string for the os name.
 o getOsNameString(int)
Returns a string revealing the name of the operating system identified by the specified id.
 o getOsType(String)
Returns the os type of the specified os name.
 o getOsTypeString(int)
Returns a string describing the specified operating system type.
 o hashCode()
Returns a hashcode value generated from the state of this Platform description.
 o isCompatible()
Determines if the target os type, or os name and/or architecture are compatible with the platform the java virtual machine is running on.
 o toString()
Convert the platform description to a string.
 o versionMatches()
Determines if the OS version configured into this platform object matches the OS version of the platform it is executed on.

Variables

 o ALL
 public static transient int ALL
This flag indicates that all values are acceptable. This flag can be used for the os type, the os name, or the cpu architecture.

 o UNIX
 public static final transient int UNIX
Generic Unix os.

 o WINDOWS
 public static final transient int WINDOWS
Generic Windows os.

 o BE
 public static final transient int BE
Generic BE os.

 o MAC
 public static final transient int MAC
Generic Macintosh os.

 o SOLARIS
 public static final transient int SOLARIS
Solaris by Sun Microsystems, Inc.

 o LINUX
 public static final transient int LINUX
Linux freeware Unix clone.

 o HPUX
 public static final transient int HPUX
HPUX Unix operating system by Hewlett Packard.

 o AIX
 public static final transient int AIX
AIX Unix operating system by IBM.

 o SCO
 public static final transient int SCO
Santa Cruz Operation Unix.

 o WIN95
 public static final transient int WIN95
Windows 95 by Microsoft.

 o WINNT
 public static final transient int WINNT
Windows NT by Microsoft.

 o MACOS
 public static final transient int MACOS
MacOS by Apple.

 o BEOS
 public static final transient int BEOS
BE os by BE.

 o IRIX
 public static final transient int IRIX
Irix by SGI

 o DEC
 public static final transient int DEC
DEC Unix

 o SPARC
 public static final transient int SPARC
Sun sparc cpu.

 o X86
 public static final transient int X86
Intel x86 series cpu.

 o ALPHA
 public static final transient int ALPHA
Alpha cpu.

 o MIPS
 public static final transient int MIPS
MIPS Cpu

 o POWERPC
 public static final transient int POWERPC
PowerPC

 o PARISC
 public static final transient int PARISC
HP's PA-RISC Archiecture

 o specifiedAttributes
 protected int specifiedAttributes
A flag indicating what platform identifiers to check compatibility against. Os Type = 1 Os Name = 2 Arch = 4

 o targetOsType
 protected int targetOsType
A value indicating the target operating system type.

 o targetOsName
 protected int targetOsName
A value indicating the target operating system name.

 o targetArch
 protected int targetArch
A value indicating the target architecture.

 o targetVersion
 protected String targetVersion
A value indicating the target version.

 o invertPlatform
 protected boolean invertPlatform
A value indicating that the compatibility flag should be inverted.

 o currentOsType
 protected static transient int currentOsType
A value indicating the runtime os type.

 o currentOsName
 protected static transient int currentOsName
A value indicating the runtime os name.

 o currentArch
 protected static transient int currentArch
A value indicating the runtime architecture.

 o currentVersion
 protected static transient String currentVersion
A value indicating the runtime os version.

 o debugMode
 protected static transient boolean debugMode
A flag that indicates whether or not debug message should be printed.

Constructors

 o Platform
 public Platform(int osType)
This constructor specifies the target operating system type.

Parameters:
osType - The target operating system type (i.e. windows or unix).
 o Platform
 public Platform(int osType,
                 boolean invert)
This constructor specifies the target operating system type.

Parameters:
osType - The target operating system type (i.e. windows or unix).
invert - Indicates whether the compatibility value should be inverted.
 o Platform
 public Platform(int osType,
                 int osName,
                 int arch)
This constructor specifies the target operating system name and/or the target cpu architecture.

Parameters:
osType - The target operating system type.
osName - The target operating system name. (i.e. Windows 95 or Solaris).
arch - The target cpu architecture. (i.e. Sparc or X86).
 o Platform
 public Platform(int osType,
                 int osName,
                 int arch,
                 String version)
This constructor specifies the target operating system name and/or the target cpu architecture as well as the os version.

Parameters:
osType - The target operating system type.
osName - The target operating system name. (i.e. Windows 95 or Solaris).
arch - The target cpu architecture. (i.e. Sparc or X86).
 o Platform
 public Platform(int osType,
                 int osName,
                 int arch,
                 String version,
                 boolean invert)
This constructor specifies the target operating system name and/or the target cpu architecture as well as the version.

Parameters:
osType - The target operating system type.
osName - The target operating system name. (i.e. Windows 95 or Solaris).
arch - The target cpu architecture. (i.e. Sparc or X86).
version - The os version.
invert - If true, the compatibility test result is inverted.

Methods

 o hashCode
 public int hashCode()
Returns a hashcode value generated from the state of this Platform description.

Overrides:
hashCode in class Object
 o equals
 public boolean equals(Object obj)
Determines if this platform object is equivalent to the specified platform object. The configuration of the platforms is used to determine equality.

Parameters:
obj - The platform object to test.
Returns:
true if the objects are equivalent; false otherwise.
Overrides:
equals in class Object
 o isCompatible
 public boolean isCompatible()
Determines if the target os type, or os name and/or architecture are compatible with the platform the java virtual machine is running on.

Returns:
true if the specified target platform is compatible with the runtime platform; false otherwise.
 o versionMatches
 public boolean versionMatches()
Determines if the OS version configured into this platform object matches the OS version of the platform it is executed on. All of the rules for describing a platform are considered.

Returns:
true if the OS version matches; false otherwise.
 o getOsType
 public static int getOsType(String osName)
Returns the os type of the specified os name.

Parameters:
osName - The name of the os. This is the property string keyed "os.name".
Returns:
The os type.
 o getOsName
 public static int getOsName(String osName)
Returns an id for the os name, given the property string for the os name.

Parameters:
osName - The name of the os. This is the property string keyed "os.name".
Returns:
The os name.
 o getArch
 public static int getArch(String arch)
Returns an id for the architecture, given the property string for the architecture.

Parameters:
arch - The architecture of the cpu. This is the property string keyed "os.arch".
Returns:
The cpu architecture.
 o getOsTypeString
 public static String getOsTypeString(int osTypeID)
Returns a string describing the specified operating system type.

Parameters:
osTypeID - The operating system type identifier.
Returns:
A string representing the specified os type.
 o getOsNameString
 public static String getOsNameString(int osNameID)
Returns a string revealing the name of the operating system identified by the specified id.

Parameters:
osNameID - The id of the desired os name.
Returns:
A String representation of the specified os name.
 o getArchString
 public static String getArchString(int archID)
Returns a String representation of the architecture identified by the specified id.

Parameters:
archID - The id that represents the desired architecture.
Returns:
A String representation of the architecture.
 o toString
 public String toString()
Convert the platform description to a string.

Returns:
A string representation of the platform description.
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index