ca.beq.util.win32.registry
Class RootKey

java.lang.Object
  |
  +--ca.beq.util.win32.registry.RootKey

public final class RootKey
extends Object

The Windows operating system defines standard registry keys ("root keys", represented by RootKey) that are always open. RootKey exposes these predefined keys in a typesafe enum that applications may use as entry points to the registry.

The system provides two predefined keys at the root of the registry:

In addition, the system defines HKEY_CURRENT_CONFIG (a subkey of HKEY_LOCAL_MACHINE), HKEY_CURRENT_USER (a subkey of HKEY_USERS), and HKEY_CLASSES_ROOT (a subkey that merges information from HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER). These registry keys are valid for all Windows implementations of the registry. In addition, other predefined keys have been defined for specific platforms.

Version:
1.0
Author:
BEQ Technologies Inc.

Field Summary
static RootKey HKEY_CLASSES_ROOT
          Registry entries subordinate to this key define types (or classes) of documents and the properties associated with those types.
static RootKey HKEY_CURRENT_CONFIG
          Registry entries subordinate to this key contain information about the current hardware profile of the local computer system.
static RootKey HKEY_CURRENT_USER
          Registry entries subordinate to this key define the preferences of the current user.
static RootKey HKEY_DYN_DATA
          Registry entries subordinate to this key allow you to collect performance data.
static RootKey HKEY_LOCAL_MACHINE
          Registry entries subordinate to this key define the physical state of the computer, including data about the bus type, system memory, and installed hardware and software.
static RootKey HKEY_PERFORMANCE_DATA
          Registry entries subordinate to this key allow you to access performance data.
static RootKey HKEY_USERS
          Registry entries subordinate to this key define the default user configuration for new users on the local computer and the user configuration for the current user.
 
Method Summary
protected  int getValue()
          Returns the integer value (used by the native Windows registry functions) of the root key.
 String toString()
          Returns the display name of the root key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HKEY_CLASSES_ROOT

public static final RootKey HKEY_CLASSES_ROOT
Registry entries subordinate to this key define types (or classes) of documents and the properties associated with those types. Shell and COM applications use the information stored under this key. File viewers and user longerface extensions store their OLE class identifiers in HKEY_CLASSES_ROOT, and in-process servers are registered in this key.

HKEY_CURRENT_USER

public static final RootKey HKEY_CURRENT_USER
Registry entries subordinate to this key define the preferences of the current user. These preferences include the settings of environment variables, data about program groups, colors, printers, network connections, and application preferences.

HKEY_LOCAL_MACHINE

public static final RootKey HKEY_LOCAL_MACHINE
Registry entries subordinate to this key define the physical state of the computer, including data about the bus type, system memory, and installed hardware and software. It contains subkeys that hold current configuration data, including Plug and Play information (the Enum branch, which includes a complete list of all hardware that has ever been on the system), network logon preferences, network security information, software-related information (such as server names and the location of the server), and other system information.

HKEY_USERS

public static final RootKey HKEY_USERS
Registry entries subordinate to this key define the default user configuration for new users on the local computer and the user configuration for the current user.

HKEY_CURRENT_CONFIG

public static final RootKey HKEY_CURRENT_CONFIG
Registry entries subordinate to this key contain information about the current hardware profile of the local computer system. The information under HKEY_CURRENT_CONFIG describes only the differences between the current hardware configuration and the standard configuration.

HKEY_PERFORMANCE_DATA

public static final RootKey HKEY_PERFORMANCE_DATA
Registry entries subordinate to this key allow you to access performance data. The data is not actually stored in the registry; the registry functions cause the system to collect the data from its source.

NOTE: HKEY_PERFORMANCE_DATA is defined only for Windows NT 4.0, Windows 2000, and Windows XP operating systems.


HKEY_DYN_DATA

public static final RootKey HKEY_DYN_DATA
Registry entries subordinate to this key allow you to collect performance data.

NOTE: HKEY_DYN_DATA is defined only for Windows 95, Windows 98, and Windows ME operating systems.

Method Detail

getValue

protected int getValue()
Returns the integer value (used by the native Windows registry functions) of the root key.
Returns:
the integer value of the root key.

toString

public String toString()
Returns the display name of the root key.
Overrides:
toString in class Object
Returns:
a string representation of the root key.