Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.classpath
Class SystemProperties  view SystemProperties download SystemProperties.java

java.lang.Object
  extended bygnu.classpath.SystemProperties

public class SystemProperties
extends java.lang.Object

The class manages the System properties. This class is only available to privileged code (i.e. code loaded by the bootstrap class loader) and therefore doesn't do any security checks. This class is separated out from java.lang.System to simplify bootstrap dependencies and to allow trusted code a simple and efficient mechanism to access the system properties.


Field Summary
private static java.util.Properties defaultProperties
          The default properties.
private static java.util.Properties properties
          Stores the current system properties.
 
Constructor Summary
SystemProperties()
           
 
Method Summary
static java.util.Properties getProperties()
           
static java.lang.String getProperty(java.lang.String name)
           
static java.lang.String getProperty(java.lang.String name, java.lang.String defaultValue)
           
static java.lang.String remove(java.lang.String name)
          Removes the supplied system property and its current value.
static void setProperties(java.util.Properties properties)
           
static java.lang.String setProperty(java.lang.String name, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

properties

private static java.util.Properties properties
Stores the current system properties. This can be modified by setProperties(Properties) 55 , but will never be null, because setProperties(null) sucks in the default properties.


defaultProperties

private static final java.util.Properties defaultProperties
The default properties. Once the default is stabilized, it should not be modified; instead it is cloned when calling setProperties(null).

Constructor Detail

SystemProperties

public SystemProperties()
Method Detail

getProperty

public static java.lang.String getProperty(java.lang.String name)

getProperty

public static java.lang.String getProperty(java.lang.String name,
                                           java.lang.String defaultValue)

setProperty

public static java.lang.String setProperty(java.lang.String name,
                                           java.lang.String value)

getProperties

public static java.util.Properties getProperties()

setProperties

public static void setProperties(java.util.Properties properties)

remove

public static java.lang.String remove(java.lang.String name)
Removes the supplied system property and its current value. If the specified property does not exist, nothing happens.