org.eclipse.core.runtime.internal.adaptor
Class EclipseEnvironmentInfo

java.lang.Object
  extended by org.eclipse.core.runtime.internal.adaptor.EclipseEnvironmentInfo
All Implemented Interfaces:
EnvironmentInfo

public class EclipseEnvironmentInfo
extends java.lang.Object
implements EnvironmentInfo

Internal class.


Method Summary
 java.lang.String[] getCommandLineArgs()
          Returns all command line arguments specified when the running framework was started.
static EclipseEnvironmentInfo getDefault()
           
 java.lang.String[] getFrameworkArgs()
          Returns the arguments consumed by the framework implementation itself.
 java.lang.String getNL()
          Returns the string name of the current locale for use in finding files whose path starts with $nl$.
 java.lang.String[] getNonFrameworkArgs()
          Returns the arguments not consumed by the framework implementation itself.
 java.lang.String getOS()
          Returns the string name of the current operating system for use in finding files whose path starts with $os$.
 java.lang.String getOSArch()
          Returns the string name of the current system architecture.
 java.lang.String getProperty(java.lang.String key)
          Returns the value for the specified property.
 java.lang.String getWS()
          Returns the string name of the current window system for use in finding files whose path starts with $ws$.
static java.lang.String guessOS(java.lang.String osName)
           
static java.lang.String guessWS(java.lang.String os)
           
 boolean inDebugMode()
          Returns true if the framework is in debug mode and false otherwise.
 boolean inDevelopmentMode()
          Returns true if the framework is in development mode and false otherwise.
static void setAllArgs(java.lang.String[] allArgs)
           
static void setAppArgs(java.lang.String[] appArgs)
           
static void setFrameworkArgs(java.lang.String[] frameworkArgs)
           
 java.lang.String setProperty(java.lang.String key, java.lang.String value)
          Sets the value for the specified property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefault

public static EclipseEnvironmentInfo getDefault()

inDevelopmentMode

public boolean inDevelopmentMode()
Description copied from interface: EnvironmentInfo
Returns true if the framework is in development mode and false otherwise.

Specified by:
inDevelopmentMode in interface EnvironmentInfo
Returns:
whether or not the framework is in development mode

inDebugMode

public boolean inDebugMode()
Description copied from interface: EnvironmentInfo
Returns true if the framework is in debug mode and false otherwise.

Specified by:
inDebugMode in interface EnvironmentInfo
Returns:
whether or not the framework is in debug mode

getCommandLineArgs

public java.lang.String[] getCommandLineArgs()
Description copied from interface: EnvironmentInfo
Returns all command line arguments specified when the running framework was started.

Specified by:
getCommandLineArgs in interface EnvironmentInfo
Returns:
the array of command line arguments.

getFrameworkArgs

public java.lang.String[] getFrameworkArgs()
Description copied from interface: EnvironmentInfo
Returns the arguments consumed by the framework implementation itself. Which arguments are consumed is implementation specific.

Specified by:
getFrameworkArgs in interface EnvironmentInfo
Returns:
the array of command line arguments consumed by the framework.

getNonFrameworkArgs

public java.lang.String[] getNonFrameworkArgs()
Description copied from interface: EnvironmentInfo
Returns the arguments not consumed by the framework implementation itself. Which arguments are consumed is implementation specific.

Specified by:
getNonFrameworkArgs in interface EnvironmentInfo
Returns:
the array of command line arguments not consumed by the framework.

getOSArch

public java.lang.String getOSArch()
Description copied from interface: EnvironmentInfo
Returns the string name of the current system architecture. The value is a user-defined string if the architecture is specified on the command line, otherwise it is the value returned by java.lang.System.getProperty("os.arch").

Specified by:
getOSArch in interface EnvironmentInfo
Returns:
the string name of the current system architecture

getNL

public java.lang.String getNL()
Description copied from interface: EnvironmentInfo
Returns the string name of the current locale for use in finding files whose path starts with $nl$.

Specified by:
getNL in interface EnvironmentInfo
Returns:
the string name of the current locale

getOS

public java.lang.String getOS()
Description copied from interface: EnvironmentInfo
Returns the string name of the current operating system for use in finding files whose path starts with $os$. Return Constants.OS_UNKNOWN if the operating system cannot be determined.

The value may indicate one of the operating systems known to the platform (as specified in org.eclipse.core.runtime.Platform#knownOSValues) or a user-defined string if the operating system name is specified on the command line.

Specified by:
getOS in interface EnvironmentInfo
Returns:
the string name of the current operating system

getWS

public java.lang.String getWS()
Description copied from interface: EnvironmentInfo
Returns the string name of the current window system for use in finding files whose path starts with $ws$. Return null if the window system cannot be determined.

Specified by:
getWS in interface EnvironmentInfo
Returns:
the string name of the current window system or null

setAllArgs

public static void setAllArgs(java.lang.String[] allArgs)

setAppArgs

public static void setAppArgs(java.lang.String[] appArgs)

setFrameworkArgs

public static void setFrameworkArgs(java.lang.String[] frameworkArgs)

guessWS

public static java.lang.String guessWS(java.lang.String os)

guessOS

public static java.lang.String guessOS(java.lang.String osName)

getProperty

public java.lang.String getProperty(java.lang.String key)
Description copied from interface: EnvironmentInfo
Returns the value for the specified property. Environment Properties are backed by the Java system properties. When the option osgi.framework.useSystemProperties is used then the environment properties are specific for each instance of the framework.

This method should be used instead of the System.getProperty(String) method to avoid the global nature of system properties.

Specified by:
getProperty in interface EnvironmentInfo
Parameters:
key - the property key
Returns:
the value of the property, or null

setProperty

public java.lang.String setProperty(java.lang.String key,
                                    java.lang.String value)
Description copied from interface: EnvironmentInfo
Sets the value for the specified property. Environment Properties are backed by the Java system properties. When the option osgi.framework.useSystemProperties is used then the environment properties are specific for each instance of the framework.

This method should be used instead of the System.setProperty(String, String) method to avoid the global nature of system properties.

Specified by:
setProperty in interface EnvironmentInfo
Parameters:
key - the property key
value - the value of the property
Returns:
the old value of the property, or null


Copyright © 2007-2012 FuseSource, Corp.. All Rights Reserved.