|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.annolab.tt4j.PlatformDetector
public class PlatformDetector
Detect platform information and normalize it.
| Field Summary | |
|---|---|
static String |
ARCH_PPC
|
static String |
ARCH_SPARC
|
static String |
ARCH_X86_32
|
static String |
ARCH_X86_64
|
static String |
OS_LINUX
|
static String |
OS_OSX
|
static String |
OS_SOLARIS
|
static String |
OS_WINDOWS
|
| Constructor Summary | |
|---|---|
PlatformDetector()
|
|
| Method Summary | |
|---|---|
String |
getArch()
Get the platform architecture. |
String |
getByteOrder()
Get the byte order. |
String[] |
getChmodCmd()
Get the chmod (change permissions) command for the current platform (if one is necessary). |
String |
getExecutableSuffix()
Get the file suffix used for executable files on the currently configured platform. |
String |
getOs()
Get the operating system. |
String |
getPlatformId()
Get the platform ID which is getOs() and getArch()
separated by a "-" (dash). |
void |
setArch(String aArch)
Override the architecture. |
void |
setByteOrder(ByteOrder aByteOrder)
Set the byte order. |
void |
setOs(String aOs)
Override the operating system name. |
void |
updatePlatform(String aOs,
String aArch,
ByteOrder aByteOrder)
Updates the platform-specific settings and normalizes them. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static String OS_WINDOWS
public static String OS_OSX
public static String OS_SOLARIS
public static String OS_LINUX
public static String ARCH_PPC
public static String ARCH_X86_32
public static String ARCH_X86_64
public static String ARCH_SPARC
| Constructor Detail |
|---|
public PlatformDetector()
| Method Detail |
|---|
public void setOs(String aOs)
aOs - an OS name as could be found in the os.name system
property.public String getOs()
public void setArch(String aArch)
aArch - "big-endian" for PowerPC or Sparc systems or
"little-endian" for x86 systems.public String getArch()
public void setByteOrder(ByteOrder aByteOrder)
aByteOrder - the byte order.public String getExecutableSuffix()
public String getByteOrder()
public String getPlatformId()
getOs() and getArch()
separated by a "-" (dash).
public void updatePlatform(String aOs,
String aArch,
ByteOrder aByteOrder)
aOs - the operating system string.aArch - the architecture string.aByteOrder - the byte-order string.public String[] getChmodCmd()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||