Package microsoft.win32
Class RegistryKey
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.MarshalByRefObject
-
- microsoft.win32.RegistryKey
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,IJCOBridgeReflected
public class RegistryKey extends MarshalByRefObject implements java.lang.AutoCloseable
The base .NET class managing Microsoft.Win32.RegistryKey, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/Microsoft.Win32.RegistryKey
Powered by JCOBridge: more info at https://www.jcobridge.com
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
assemblyFullName
Fully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089static java.lang.String
assemblyShortName
Assembly name: mscorlibstatic java.lang.String
className
Qualified class name: Microsoft.Win32.RegistryKeystatic JCType
classType
The type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description RegistryKey()
RegistryKey(java.lang.Object instance)
Internal constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RegistryKey
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoRegistryKey
, a cast assert is made to check if types are compatible.void
close()
void
Close()
RegistryKey
CreateSubKey(java.lang.String subkey)
RegistryKey
CreateSubKey(java.lang.String subkey, boolean writable)
RegistryKey
CreateSubKey(java.lang.String subkey, boolean writable, RegistryOptions options)
RegistryKey
CreateSubKey(java.lang.String subkey, RegistryKeyPermissionCheck permissionCheck)
RegistryKey
CreateSubKey(java.lang.String subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions options)
RegistryKey
CreateSubKey(java.lang.String subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions, RegistrySecurity registrySecurity)
RegistryKey
CreateSubKey(java.lang.String subkey, RegistryKeyPermissionCheck permissionCheck, RegistrySecurity registrySecurity)
void
DeleteSubKey(java.lang.String subkey)
void
DeleteSubKey(java.lang.String subkey, boolean throwOnMissingSubKey)
void
DeleteSubKeyTree(java.lang.String subkey)
void
DeleteSubKeyTree(java.lang.String subkey, boolean throwOnMissingSubKey)
void
DeleteValue(java.lang.String name)
void
DeleteValue(java.lang.String name, boolean throwOnMissingValue)
void
Dispose()
void
Flush()
static RegistryKey
FromHandle(SafeRegistryHandle handle)
static RegistryKey
FromHandle(SafeRegistryHandle handle, RegistryView view)
RegistrySecurity
GetAccessControl()
RegistrySecurity
GetAccessControl(AccessControlSections includeSections)
SafeRegistryHandle
getHandle()
java.lang.String
getJCOAssemblyName()
Returns the reflected Assembly namejava.lang.String
getJCOClassName()
Returns the reflected Class namejava.lang.Object
getJCOInstance()
Returns the instantiated classjava.lang.String
getJCOObjectName()
Returns the reflected Class name used to build the objectJCType
getJCOType()
Returns the instantiated class Typejava.lang.String
getName()
int
getSubKeyCount()
java.lang.String[]
GetSubKeyNames()
NetObject
GetValue(java.lang.String name)
NetObject
GetValue(java.lang.String name, NetObject defaultValue)
NetObject
GetValue(java.lang.String name, NetObject defaultValue, RegistryValueOptions options)
int
getValueCount()
RegistryValueKind
GetValueKind(java.lang.String name)
java.lang.String[]
GetValueNames()
RegistryView
getView()
static RegistryKey
OpenBaseKey(RegistryHive hKey, RegistryView view)
static RegistryKey
OpenRemoteBaseKey(RegistryHive hKey, java.lang.String machineName)
static RegistryKey
OpenRemoteBaseKey(RegistryHive hKey, java.lang.String machineName, RegistryView view)
RegistryKey
OpenSubKey(java.lang.String name)
RegistryKey
OpenSubKey(java.lang.String name, boolean writable)
RegistryKey
OpenSubKey(java.lang.String name, RegistryKeyPermissionCheck permissionCheck)
RegistryKey
OpenSubKey(java.lang.String name, RegistryKeyPermissionCheck permissionCheck, RegistryRights rights)
RegistryKey
OpenSubKey(java.lang.String name, RegistryRights rights)
void
SetAccessControl(RegistrySecurity registrySecurity)
void
setJCOInstance(JCObject instance)
void
SetValue(java.lang.String name, NetObject value)
void
SetValue(java.lang.String name, NetObject value, RegistryValueKind valueKind)
-
Methods inherited from class system.MarshalByRefObject
CreateObjRef, GetLifetimeService, InitializeLifetimeService
-
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: mscorlib- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: Microsoft.Win32.RegistryKey- See Also:
- Constant Field Values
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Assembly name- Specified by:
getJCOAssemblyName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOAssemblyName
in classMarshalByRefObject
- Returns:
- A
String
representing the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name- Specified by:
getJCOClassName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOClassName
in classMarshalByRefObject
- Returns:
- A
String
representing the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name used to build the object- Specified by:
getJCOObjectName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOObjectName
in classMarshalByRefObject
- Returns:
- A
String
representing the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class- Specified by:
getJCOInstance
in interfaceIJCOBridgeReflected
- Overrides:
getJCOInstance
in classMarshalByRefObject
- Returns:
- An
Object
representing the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstance
in classMarshalByRefObject
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class Type- Specified by:
getJCOType
in interfaceIJCOBridgeReflected
- Overrides:
getJCOType
in classMarshalByRefObject
- Returns:
- A
JCType
representing the CLR Type of the instantiated Class
-
cast
public static RegistryKey cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflected
instance intoRegistryKey
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
RegistryKey
instance- Throws:
java.lang.Throwable
- in case of error during cast operation
-
CreateSubKey
public RegistryKey CreateSubKey(java.lang.String subkey) throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, UnauthorizedAccessException, IndexOutOfRangeException, OutOfMemoryException, IOException
-
CreateSubKey
public RegistryKey CreateSubKey(java.lang.String subkey, boolean writable) throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, IndexOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, UnauthorizedAccessException, IOException
-
CreateSubKey
public RegistryKey CreateSubKey(java.lang.String subkey, boolean writable, RegistryOptions options) throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, IndexOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, UnauthorizedAccessException, IOException
-
CreateSubKey
public RegistryKey CreateSubKey(java.lang.String subkey, RegistryKeyPermissionCheck permissionCheck) throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, IndexOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, UnauthorizedAccessException, IOException
-
CreateSubKey
public RegistryKey CreateSubKey(java.lang.String subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions options) throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, IndexOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, UnauthorizedAccessException, IOException
-
CreateSubKey
public RegistryKey CreateSubKey(java.lang.String subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions, RegistrySecurity registrySecurity) throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, IndexOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, UnauthorizedAccessException, IOException
-
CreateSubKey
public RegistryKey CreateSubKey(java.lang.String subkey, RegistryKeyPermissionCheck permissionCheck, RegistrySecurity registrySecurity) throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, IndexOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, UnauthorizedAccessException, IOException
-
FromHandle
public static RegistryKey FromHandle(SafeRegistryHandle handle) throws java.lang.Throwable, ArgumentNullException, ArgumentException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
-
FromHandle
public static RegistryKey FromHandle(SafeRegistryHandle handle, RegistryView view) throws java.lang.Throwable, ArgumentNullException, ArgumentException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
-
OpenBaseKey
public static RegistryKey OpenBaseKey(RegistryHive hKey, RegistryView view) throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, FormatException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentNullException
ArgumentOutOfRangeException
FormatException
-
OpenRemoteBaseKey
public static RegistryKey OpenRemoteBaseKey(RegistryHive hKey, java.lang.String machineName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, FormatException, UnauthorizedAccessException, IOException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
FormatException
UnauthorizedAccessException
IOException
-
OpenRemoteBaseKey
public static RegistryKey OpenRemoteBaseKey(RegistryHive hKey, java.lang.String machineName, RegistryView view) throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, UnauthorizedAccessException, IOException
- Throws:
java.lang.Throwable
ArgumentNullException
ArgumentException
ArgumentOutOfRangeException
FormatException
UnauthorizedAccessException
IOException
-
OpenSubKey
public RegistryKey OpenSubKey(java.lang.String name) throws java.lang.Throwable, ArgumentNullException, ArgumentOutOfRangeException, ArgumentException, IndexOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, SecurityException
-
OpenSubKey
public RegistryKey OpenSubKey(java.lang.String name, boolean writable) throws java.lang.Throwable, ArgumentNullException, ArgumentOutOfRangeException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, ObjectDisposedException, FormatException, IndexOutOfRangeException, SecurityException
-
OpenSubKey
public RegistryKey OpenSubKey(java.lang.String name, RegistryKeyPermissionCheck permissionCheck) throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, IndexOutOfRangeException, CultureNotFoundException, InvalidOperationException, SecurityException, ObjectDisposedException
-
OpenSubKey
public RegistryKey OpenSubKey(java.lang.String name, RegistryKeyPermissionCheck permissionCheck, RegistryRights rights) throws java.lang.Throwable, ArgumentNullException, ArgumentOutOfRangeException, ArgumentException, IndexOutOfRangeException, CultureNotFoundException, InvalidOperationException, SecurityException, ObjectDisposedException
-
OpenSubKey
public RegistryKey OpenSubKey(java.lang.String name, RegistryRights rights) throws java.lang.Throwable, ArgumentNullException, ArgumentOutOfRangeException, ArgumentException, IndexOutOfRangeException, CultureNotFoundException, InvalidOperationException, SecurityException, ObjectDisposedException
-
GetValueKind
public RegistryValueKind GetValueKind(java.lang.String name) throws java.lang.Throwable, ArgumentNullException, FormatException, ArgumentException, IndexOutOfRangeException, ArgumentOutOfRangeException, ObjectDisposedException, UnauthorizedAccessException, IOException, NotSupportedException, InvalidOperationException
-
GetValue
public NetObject GetValue(java.lang.String name) throws java.lang.Throwable, ArgumentNullException, FormatException, ArgumentException, IndexOutOfRangeException, ArgumentOutOfRangeException, ObjectDisposedException, UnauthorizedAccessException, IOException
-
GetValue
public NetObject GetValue(java.lang.String name, NetObject defaultValue) throws java.lang.Throwable, ArgumentNullException, FormatException, ArgumentException, IndexOutOfRangeException, ArgumentOutOfRangeException, ObjectDisposedException, UnauthorizedAccessException, IOException
-
GetValue
public NetObject GetValue(java.lang.String name, NetObject defaultValue, RegistryValueOptions options) throws java.lang.Throwable, ArgumentNullException, TypeLoadException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, NotSupportedException, CultureNotFoundException, ArgumentOutOfRangeException, OutOfMemoryException, FormatException, IndexOutOfRangeException, ObjectDisposedException, UnauthorizedAccessException, IOException
- Throws:
java.lang.Throwable
ArgumentNullException
TypeLoadException
ArgumentException
InvalidOperationException
MissingMethodException
TargetInvocationException
NotSupportedException
CultureNotFoundException
ArgumentOutOfRangeException
OutOfMemoryException
FormatException
IndexOutOfRangeException
ObjectDisposedException
UnauthorizedAccessException
IOException
-
GetAccessControl
public RegistrySecurity GetAccessControl() throws java.lang.Throwable, ObjectDisposedException, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, OutOfMemoryException, UnauthorizedAccessException, InvalidOperationException, PrivilegeNotHeldException, SystemException, OverflowException, IndexOutOfRangeException, NullReferenceException, NotSupportedException
- Throws:
java.lang.Throwable
ObjectDisposedException
ArgumentNullException
ArgumentException
ArgumentOutOfRangeException
FormatException
OutOfMemoryException
UnauthorizedAccessException
InvalidOperationException
PrivilegeNotHeldException
SystemException
OverflowException
IndexOutOfRangeException
NullReferenceException
NotSupportedException
-
GetAccessControl
public RegistrySecurity GetAccessControl(AccessControlSections includeSections) throws java.lang.Throwable, ObjectDisposedException, ArgumentNullException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, ArgumentOutOfRangeException, FormatException, OutOfMemoryException, UnauthorizedAccessException, PrivilegeNotHeldException, SystemException, OverflowException, IndexOutOfRangeException, NullReferenceException, NotSupportedException
- Throws:
java.lang.Throwable
ObjectDisposedException
ArgumentNullException
ArgumentException
InvalidOperationException
MissingMethodException
TargetInvocationException
ArgumentOutOfRangeException
FormatException
OutOfMemoryException
UnauthorizedAccessException
PrivilegeNotHeldException
SystemException
OverflowException
IndexOutOfRangeException
NullReferenceException
NotSupportedException
-
GetSubKeyNames
public java.lang.String[] GetSubKeyNames() throws java.lang.Throwable, ArgumentNullException, FormatException, ArgumentException, IndexOutOfRangeException, ArgumentOutOfRangeException, ObjectDisposedException, UnauthorizedAccessException, IOException
-
GetValueNames
public java.lang.String[] GetValueNames() throws java.lang.Throwable, ArgumentNullException, FormatException, ArgumentException, IndexOutOfRangeException, ArgumentOutOfRangeException, ObjectDisposedException, UnauthorizedAccessException, IOException
-
Close
public void Close() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
DeleteSubKey
public void DeleteSubKey(java.lang.String subkey) throws java.lang.Throwable, ArgumentNullException, ArgumentOutOfRangeException, ArgumentException, IndexOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, UnauthorizedAccessException, IOException
-
DeleteSubKey
public void DeleteSubKey(java.lang.String subkey, boolean throwOnMissingSubKey) throws java.lang.Throwable, ArgumentNullException, ArgumentOutOfRangeException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, ObjectDisposedException, UnauthorizedAccessException, FormatException, IndexOutOfRangeException, IOException
-
DeleteSubKeyTree
public void DeleteSubKeyTree(java.lang.String subkey) throws java.lang.Throwable, ArgumentNullException, ArgumentOutOfRangeException, ArgumentException, IndexOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, UnauthorizedAccessException, IOException
-
DeleteSubKeyTree
public void DeleteSubKeyTree(java.lang.String subkey, boolean throwOnMissingSubKey) throws java.lang.Throwable, ArgumentNullException, ArgumentOutOfRangeException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, ObjectDisposedException, UnauthorizedAccessException, FormatException, IndexOutOfRangeException, IOException
-
DeleteValue
public void DeleteValue(java.lang.String name) throws java.lang.Throwable, ObjectDisposedException, UnauthorizedAccessException, ArgumentNullException, FormatException, ArgumentException, IndexOutOfRangeException
- Throws:
java.lang.Throwable
ObjectDisposedException
UnauthorizedAccessException
ArgumentNullException
FormatException
ArgumentException
IndexOutOfRangeException
-
DeleteValue
public void DeleteValue(java.lang.String name, boolean throwOnMissingValue) throws java.lang.Throwable, ObjectDisposedException, UnauthorizedAccessException, ArgumentNullException, FormatException, ArgumentException, IndexOutOfRangeException, ArgumentOutOfRangeException
-
Dispose
public void Dispose() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
Flush
public void Flush() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
SetAccessControl
public void SetAccessControl(RegistrySecurity registrySecurity) throws java.lang.Throwable, ObjectDisposedException, UnauthorizedAccessException, ArgumentNullException, FormatException, ArgumentException, IndexOutOfRangeException, ArgumentOutOfRangeException, NullReferenceException, NotSupportedException, InvalidOperationException, OutOfMemoryException, PrivilegeNotHeldException, InvalidProgramException
- Throws:
java.lang.Throwable
ObjectDisposedException
UnauthorizedAccessException
ArgumentNullException
FormatException
ArgumentException
IndexOutOfRangeException
ArgumentOutOfRangeException
NullReferenceException
NotSupportedException
InvalidOperationException
OutOfMemoryException
PrivilegeNotHeldException
InvalidProgramException
-
SetValue
public void SetValue(java.lang.String name, NetObject value) throws java.lang.Throwable, ArgumentNullException, ArgumentException, ArgumentOutOfRangeException, FormatException, NotSupportedException, InvalidOperationException, ObjectDisposedException, UnauthorizedAccessException, IndexOutOfRangeException, IOException
-
SetValue
public void SetValue(java.lang.String name, NetObject value, RegistryValueKind valueKind) throws java.lang.Throwable, ArgumentNullException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, ArgumentOutOfRangeException, FormatException, NotSupportedException, ObjectDisposedException, UnauthorizedAccessException, IndexOutOfRangeException, IOException
-
close
public void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-
getSubKeyCount
public int getSubKeyCount() throws java.lang.Throwable, ArgumentNullException, FormatException, ArgumentException, IndexOutOfRangeException, ArgumentOutOfRangeException, ObjectDisposedException, UnauthorizedAccessException, IOException
-
getValueCount
public int getValueCount() throws java.lang.Throwable, ArgumentNullException, FormatException, ArgumentException, IndexOutOfRangeException, ArgumentOutOfRangeException, ObjectDisposedException, UnauthorizedAccessException, IOException
-
getView
public RegistryView getView() throws java.lang.Throwable, ObjectDisposedException
- Throws:
java.lang.Throwable
ObjectDisposedException
-
getHandle
public SafeRegistryHandle getHandle() throws java.lang.Throwable, ObjectDisposedException, ArgumentNullException, ArgumentException, InvalidOperationException, MissingMethodException, TargetInvocationException, CultureNotFoundException, ArgumentOutOfRangeException, OutOfMemoryException, FormatException, UnauthorizedAccessException, IOException
-
getName
public java.lang.String getName() throws java.lang.Throwable, ObjectDisposedException
- Throws:
java.lang.Throwable
ObjectDisposedException
-
-