|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.lang.SystemUtils org.mule.util.SystemUtils
public class SystemUtils
Field Summary | |
---|---|
static boolean |
IS_JAVA_1_7
|
protected static Log |
logger
|
Constructor Summary | |
---|---|
SystemUtils()
|
Method Summary | |
---|---|
static String |
getCommandLineOption(String option,
String[] args,
String[][] opts)
Returns the value corresponding to the given option from the command line, for example if the options are "-config mule-config.xml" getCommandLineOption("config") would return "mule-config.xml" |
static Map<String,Object> |
getCommandLineOptions(String[] args,
String[][] opts)
Returns a Map of all options in the command line. |
static Map |
getenv()
Get the operating system environment variables. |
static String |
getenv(String name)
|
static boolean |
hasCommandLineOption(String option,
String[] args,
String[][] opts)
Checks whether a command line option is set. |
static boolean |
isAppleJDK()
|
static boolean |
isIbmJDK()
|
static boolean |
isSunJDK()
|
static String |
legalizeFileName(String name)
Ensure a generated file name is legal. |
static Map<String,String> |
parsePropertyDefinitions(String input)
Returns a Map of all valid property definitions in -Dkey=value
format. |
Methods inherited from class org.apache.commons.lang.SystemUtils |
---|
getJavaHome, getJavaIoTmpDir, getJavaVersion, getUserDir, getUserHome, isJavaAwtHeadless, isJavaVersionAtLeast, isJavaVersionAtLeast |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Log logger
public static final boolean IS_JAVA_1_7
Constructor Detail |
---|
public SystemUtils()
Method Detail |
---|
public static Map getenv()
public static String getenv(String name)
public static boolean isSunJDK()
public static boolean isAppleJDK()
public static boolean isIbmJDK()
public static String getCommandLineOption(String option, String[] args, String[][] opts) throws DefaultMuleException
DefaultMuleException
public static boolean hasCommandLineOption(String option, String[] args, String[][] opts) throws DefaultMuleException
DefaultMuleException
public static Map<String,Object> getCommandLineOptions(String[] args, String[][] opts) throws DefaultMuleException
DefaultMuleException
public static Map<String,String> parsePropertyDefinitions(String input)
-Dkey=value
format. -Dkey
is interpreted as -Dkey=true
,
everything else is ignored. Whitespace in values is properly handled but needs
to be quoted properly: -Dkey="some value"
.
input
- String with property definitionn
Map
of property String keys with their defined values
(Strings). If no valid key-value pairs can be parsed, the map is
empty.public static String legalizeFileName(String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |