org.eclipse.osgi.service.environment
Interface EnvironmentInfo


public interface EnvironmentInfo

A Framework service which gives access to the command line used to start this running framework as well as information about the environment such as the current operating system, machine architecture, locale and windowing system.

This interface is not intended to be implemented by clients.

Since:
3.0 XXX Need to add a method that gets the real application args. We might also want to explain how the command line is organized: fwk / non fwk. Non-fwk is rt args and app args.

Method Summary
 java.lang.String[] getCommandLineArgs()
          Returns all command line arguments specified when the running framework was started.
 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 getWS()
          Returns the string name of the current window system for use in finding files whose path starts with $ws$.
 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.
 

Method Detail

getCommandLineArgs

java.lang.String[] getCommandLineArgs()
Returns all command line arguments specified when the running framework was started.

Returns:
the array of command line arguments.

getFrameworkArgs

java.lang.String[] getFrameworkArgs()
Returns the arguments consumed by the framework implementation itself. Which arguments are consumed is implementation specific.

Returns:
the array of command line arguments consumed by the framework.

getNonFrameworkArgs

java.lang.String[] getNonFrameworkArgs()
Returns the arguments not consumed by the framework implementation itself. Which arguments are consumed is implementation specific.

Returns:
the array of command line arguments not consumed by the framework.

getOSArch

java.lang.String getOSArch()
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").

Returns:
the string name of the current system architecture

getNL

java.lang.String getNL()
Returns the string name of the current locale for use in finding files whose path starts with $nl$.

Returns:
the string name of the current locale

getOS

java.lang.String getOS()
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.

Returns:
the string name of the current operating system

getWS

java.lang.String getWS()
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.

Returns:
the string name of the current window system or null

inDebugMode

boolean inDebugMode()
Returns true if the framework is in debug mode and false otherwise.

Returns:
whether or not the framework is in debug mode

inDevelopmentMode

boolean inDevelopmentMode()
Returns true if the framework is in development mode and false otherwise.

Returns:
whether or not the framework is in development mode