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).
-
AIX
- AIX Unix operating system by IBM.
-
ALL
- This flag indicates that all values are
acceptable.
-
ALPHA
- Alpha cpu.
-
BE
- Generic BE os.
-
BEOS
- BE os by BE.
-
currentArch
- A value indicating the runtime architecture.
-
currentOsName
- A value indicating the runtime os name.
-
currentOsType
- A value indicating the runtime os type.
-
currentVersion
- A value indicating the runtime os version.
-
debugMode
- A flag that indicates whether or not debug message should
be printed.
-
DEC
- DEC Unix
-
HPUX
- HPUX Unix operating system by Hewlett Packard.
-
invertPlatform
- A value indicating that the compatibility flag
should be inverted.
-
IRIX
- Irix by SGI
-
LINUX
- Linux freeware Unix clone.
-
MAC
- Generic Macintosh os.
-
MACOS
- MacOS by Apple.
-
MIPS
- MIPS Cpu
-
PARISC
- HP's PA-RISC Archiecture
-
POWERPC
- PowerPC
-
SCO
- Santa Cruz Operation Unix.
-
SOLARIS
- Solaris by Sun Microsystems, Inc.
-
SPARC
- Sun sparc cpu.
-
specifiedAttributes
- A flag indicating what platform identifiers
to check compatibility against.
-
targetArch
- A value indicating the target architecture.
-
targetOsName
- A value indicating the target operating system
name.
-
targetOsType
- A value indicating the target operating system
type.
-
targetVersion
- A value indicating the target version.
-
UNIX
- Generic Unix os.
-
WIN95
- Windows 95 by Microsoft.
-
WINDOWS
- Generic Windows os.
-
WINNT
- Windows NT by Microsoft.
-
X86
- Intel x86 series cpu.
-
Platform(int)
- This constructor specifies the target operating
system type.
-
Platform(int, boolean)
- This constructor specifies the target operating
system type.
-
Platform(int, int, int)
- This constructor specifies the target operating system
name and/or the target cpu architecture.
-
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.
-
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.
-
equals(Object)
- Determines if this platform object is equivalent to the
specified platform object.
-
getArch(String)
- Returns an id for the architecture, given the property
string for the architecture.
-
getArchString(int)
- Returns a String representation of the architecture identified
by the specified id.
-
getOsName(String)
- Returns an id for the os name, given the property
string for the os name.
-
getOsNameString(int)
- Returns a string revealing the name of the operating system identified
by the specified id.
-
getOsType(String)
- Returns the os type of the specified os name.
-
getOsTypeString(int)
- Returns a string describing the specified operating system type.
-
hashCode()
- Returns a hashcode value generated from the state of this
Platform description.
-
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.
-
toString()
- Convert the platform description to a string.
-
versionMatches()
- Determines if the OS version configured into this platform object
matches the OS version of the platform it is executed on.
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.
UNIX
public static final transient int UNIX
- Generic Unix os.
WINDOWS
public static final transient int WINDOWS
- Generic Windows os.
BE
public static final transient int BE
- Generic BE os.
MAC
public static final transient int MAC
- Generic Macintosh os.
SOLARIS
public static final transient int SOLARIS
- Solaris by Sun Microsystems, Inc.
LINUX
public static final transient int LINUX
- Linux freeware Unix clone.
HPUX
public static final transient int HPUX
- HPUX Unix operating system by Hewlett Packard.
AIX
public static final transient int AIX
- AIX Unix operating system by IBM.
SCO
public static final transient int SCO
- Santa Cruz Operation Unix.
WIN95
public static final transient int WIN95
- Windows 95 by Microsoft.
WINNT
public static final transient int WINNT
- Windows NT by Microsoft.
MACOS
public static final transient int MACOS
- MacOS by Apple.
BEOS
public static final transient int BEOS
- BE os by BE.
IRIX
public static final transient int IRIX
- Irix by SGI
DEC
public static final transient int DEC
- DEC Unix
SPARC
public static final transient int SPARC
- Sun sparc cpu.
X86
public static final transient int X86
- Intel x86 series cpu.
ALPHA
public static final transient int ALPHA
- Alpha cpu.
MIPS
public static final transient int MIPS
- MIPS Cpu
POWERPC
public static final transient int POWERPC
- PowerPC
PARISC
public static final transient int PARISC
- HP's PA-RISC Archiecture
specifiedAttributes
protected int specifiedAttributes
- A flag indicating what platform identifiers
to check compatibility against.
Os Type = 1
Os Name = 2
Arch = 4
targetOsType
protected int targetOsType
- A value indicating the target operating system
type.
targetOsName
protected int targetOsName
- A value indicating the target operating system
name.
targetArch
protected int targetArch
- A value indicating the target architecture.
targetVersion
protected String targetVersion
- A value indicating the target version.
invertPlatform
protected boolean invertPlatform
- A value indicating that the compatibility flag
should be inverted.
currentOsType
protected static transient int currentOsType
- A value indicating the runtime os type.
currentOsName
protected static transient int currentOsName
- A value indicating the runtime os name.
currentArch
protected static transient int currentArch
- A value indicating the runtime architecture.
currentVersion
protected static transient String currentVersion
- A value indicating the runtime os version.
debugMode
protected static transient boolean debugMode
- A flag that indicates whether or not debug message should
be printed.
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).
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.
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).
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).
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.
hashCode
public int hashCode()
- Returns a hashcode value generated from the state of this
Platform description.
- Overrides:
- hashCode in class Object
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
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.
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.
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.
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.
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.
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.
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.
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.
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