org.eclipse.cdt.utils

## Class WindowsRegistry

- java.lang.Object
- - org.eclipse.cdt.utils.WindowsRegistry

    public class WindowsRegistry
    extends Object

Restriction:
  This class is not intended to be subclassed by clients.
Restriction:
  This class is not intended to be instantiated by clients.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`String` `getCurrentUserKeyName(String subkey, int index)` Given a subkey of HKEY_CURRENT_USER, and an index (starting from 0) to the key's array of sub keys, return the name of the indexed key.
`String` `getCurrentUserValue(String subkey, String name)` Gets the registry value for the subkey of HKEY_CURRENT_USER with the given name.
`String` `getCurrentUserValueName(String subkey, int index)` Given a subkey of HKEY_CURRENT_USER, and an index (starting from 0) to the key's array of values, return the name of the indexed value.
`String` `getLocalMachineKeyName(String subkey, int index)` Given a subkey of HKEY_LOCAL_MACHINE, and an index (starting from 0) to the key's array of sub keys, return the name of the indexed key.
`String` `getLocalMachineValue(String subkey, String name)` Gets the registry value for the subkey of HKEY_LOCAL_MACHINE with the given name.
`String` `getLocalMachineValueName(String subkey, int index)` Given a subkey of HKEY_LOCAL_MACHINE, and an index (starting from 0) to the key's array of values, return the name of the indexed value.
`static WindowsRegistry` `getRegistry()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### getRegistry

    public static WindowsRegistry getRegistry()

#### getLocalMachineValue

    public String getLocalMachineValue(String subkey,
                                       String name)

Gets the registry value for the subkey of HKEY_LOCAL_MACHINE with the given name. If problems occur, like the name is not found, null is returned.

Parameters:
  `subkey` - subkey of HKEY_LOCAL_MACHINE
  `name` - name of the registry value
Returns:
  registry value or null if not found

#### getLocalMachineValueName

    public String getLocalMachineValueName(String subkey,
                                           int index)

Given a subkey of HKEY_LOCAL_MACHINE, and an index (starting from 0) to the key's array of values, return the name of the indexed value. The return value is null on any error or when the index is invalid. The value name can be used in the above getLocalMachineValue() to retrieve the value data.

Parameters:
  `subkey` - subkey of HKEY_LOCAL_MACHINE
  `index` - index to the subkey's array of values, starting from 0.
Returns:
  name of registry value or null if not found

#### getLocalMachineKeyName

    public String getLocalMachineKeyName(String subkey,
                                         int index)

Given a subkey of HKEY_LOCAL_MACHINE, and an index (starting from 0) to the key's array of sub keys, return the name of the indexed key. The return value is null on any error or when the index is invalid. The key name can be used in the above getLocalMachineValueName() to retrieve value names.

Parameters:
  `subkey` - subkey of HKEY_CURRENT_USER
  `index` - index to the subkey's array of values, starting from 0.
Returns:
  name of registry value or null if not found

#### getCurrentUserValue

    public String getCurrentUserValue(String subkey,
                                      String name)

Gets the registry value for the subkey of HKEY_CURRENT_USER with the given name. If problems occur, like the name is not found, null is returned.

Parameters:
  `subkey` - subkey of HKEY_CURRENT_USER
  `name` - name of the registry value
Returns:
  registry value or null if not found

#### getCurrentUserValueName

    public String getCurrentUserValueName(String subkey,
                                          int index)

Given a subkey of HKEY_CURRENT_USER, and an index (starting from 0) to the key's array of values, return the name of the indexed value. The return value is null on any error or when the index is invalid. The value name can be used in the above getCurrentUserValue() to retrieve the value data.

Parameters:
  `subkey` - subkey of HKEY_CURRENT_USER
  `index` - index to the subkey's array of values, starting from 0.
Returns:
  name of registry value or null if not found

#### getCurrentUserKeyName

    public String getCurrentUserKeyName(String subkey,
                                        int index)

Given a subkey of HKEY_CURRENT_USER, and an index (starting from 0) to the key's array of sub keys, return the name of the indexed key. The return value is null on any error or when the index is invalid. The key name can be used in the above getCurrentUserValueName() to retrieve value names.

Parameters:
  `subkey` - subkey of HKEY_CURRENT_USER
  `index` - index to the subkey's array of values, starting from 0.
Returns:
  name of registry value or null if not found