|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.izforge.izpack.util.Platform
public class Platform
Encapsulates details of the operating system platform.
| Nested Class Summary | |
|---|---|
static class |
Platform.Arch
The operating system architecture. |
static class |
Platform.Name
Platform family name. |
| Field Summary | |
|---|---|
static String[] |
invalidWindowsDirectoryChars
Invalid Windows Characters http://msdn.microsoft.com/en-us/library/aa365247.aspx Forward slash not included because installer will end up creating directory with backslash NOTE: We choose double backslash to be invalid rather than just backslash, because we are checking against paths A normal backslash would just represent another folder |
| Constructor Summary | |
|---|---|
Platform(Platform.Name name)
Constructs a Platform from the specified name. |
|
Platform(Platform.Name name,
Platform.Arch arch)
Constructs a Platform. |
|
Platform(Platform.Name name,
String version)
Constructs a Platform from the specified name and version. |
|
Platform(Platform.Name name,
String symbolicName,
Platform.Arch arch)
Constructs a Platform. |
|
Platform(Platform.Name name,
String symbolicName,
String version)
Constructs a Platform. |
|
Platform(Platform.Name name,
String symbolicName,
String version,
Platform.Arch arch)
Constructs a Platform. |
|
Platform(Platform.Name name,
String symbolicName,
String version,
Platform.Arch arch,
String javaVersion)
Constructs a Platform. |
|
Platform(Platform platform,
Platform.Arch arch)
Constructs a Platform from another, with the specified architecture. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
Determines if this platform equals another. |
Platform.Arch |
getArch()
Returns the operating system architecture. |
String |
getJavaVersion()
Returns the java version. |
Platform.Name |
getName()
Returns the platform family name. |
String |
getSymbolicName()
Returns the symbolic name for the platform. |
String |
getVersion()
Returns the operating system version. |
int |
hashCode()
Returns a hash for the platform. |
boolean |
isA(Platform.Arch arch)
Determines if this platform is the specified architecture. |
boolean |
isA(Platform.Name name)
Determines if this platform is an instance of the platform family name. |
boolean |
isA(Platform platform)
Determines if this platform is an instance of another. |
boolean |
isValidDirectoryPath(File directory)
Check if a fully qualified directory path contains valid syntax. |
boolean |
isValidDirectoryPath(String directoryPath)
|
boolean |
isValidDirectorySyntax(String directoryPath)
Determine invalid directory character for the given OS. |
String |
toString()
Returns a string representation of the platform. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String[] invalidWindowsDirectoryChars
| Constructor Detail |
|---|
public Platform(Platform.Name name)
name - the platform name
public Platform(Platform.Name name,
String version)
name - the platform nameversion - the platform version. May be null
public Platform(Platform.Name name,
String symbolicName,
String version)
name - the platform namesymbolicName - the symbolic name. May be nullversion - the platform version. May be null
IllegalArgumentException - if symbolicName contains spaces or commas
public Platform(Platform.Name name,
Platform.Arch arch)
name - the platform namearch - the platform architecture. May be null
public Platform(Platform.Name name,
String symbolicName,
Platform.Arch arch)
name - the platform namesymbolicName - the symbolic name. May be nullarch - the platform architecture. May be null
IllegalArgumentException - if symbolicName contains spaces or commas
public Platform(Platform.Name name,
String symbolicName,
String version,
Platform.Arch arch)
name - the platform namesymbolicName - the symbolic name. May be nullversion - the platform version. May be nullarch - the platform architecture. May be null
IllegalArgumentException - if symbolicName contains spaces or commas
public Platform(Platform.Name name,
String symbolicName,
String version,
Platform.Arch arch,
String javaVersion)
name - the platform namesymbolicName - the symbolic name. May be nullversion - the platform version. May be nullarch - the platform architecture. May be nulljavaVersion - the java version. May be null
IllegalArgumentException - if symbolicName contains spaces or commas
public Platform(Platform platform,
Platform.Arch arch)
platform - the templatearch - the architecture| Method Detail |
|---|
public Platform.Name getName()
public String getSymbolicName()
nullpublic String getVersion()
nullpublic String getJavaVersion()
nullpublic Platform.Arch getArch()
public boolean isA(Platform platform)
platform - the platform to compare against
true if the platform is an instance of platformpublic boolean isA(Platform.Name name)
name - the platform family name
true if the platform is an instance of namepublic boolean isA(Platform.Arch arch)
arch - the architecture
true if this platform is the specified architecture, otherwise falsepublic boolean isValidDirectorySyntax(String directoryPath)
public boolean isValidDirectoryPath(File directory)
directory -
public boolean isValidDirectoryPath(String directoryPath)
public boolean equals(Object other)
equals in class Objectother - the other instance
true if the name, arch and version are identical, otherwise falsepublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||