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.StringassemblyFullNameFully assembly qualified name: mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089static java.lang.StringassemblyShortNameAssembly name: mscorlibstatic java.lang.StringclassNameQualified class name: Microsoft.Win32.RegistryKeystatic JCTypeclassTypeThe 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 RegistryKeycast(IJCOBridgeReflected from)Try to cast theIJCOBridgeReflectedinstance intoRegistryKey, a cast assert is made to check if types are compatible.voidclose()voidClose()RegistryKeyCreateSubKey(java.lang.String subkey)RegistryKeyCreateSubKey(java.lang.String subkey, boolean writable)RegistryKeyCreateSubKey(java.lang.String subkey, boolean writable, RegistryOptions options)RegistryKeyCreateSubKey(java.lang.String subkey, RegistryKeyPermissionCheck permissionCheck)RegistryKeyCreateSubKey(java.lang.String subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions options)RegistryKeyCreateSubKey(java.lang.String subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions, RegistrySecurity registrySecurity)RegistryKeyCreateSubKey(java.lang.String subkey, RegistryKeyPermissionCheck permissionCheck, RegistrySecurity registrySecurity)voidDeleteSubKey(java.lang.String subkey)voidDeleteSubKey(java.lang.String subkey, boolean throwOnMissingSubKey)voidDeleteSubKeyTree(java.lang.String subkey)voidDeleteSubKeyTree(java.lang.String subkey, boolean throwOnMissingSubKey)voidDeleteValue(java.lang.String name)voidDeleteValue(java.lang.String name, boolean throwOnMissingValue)voidDispose()voidFlush()static RegistryKeyFromHandle(SafeRegistryHandle handle)static RegistryKeyFromHandle(SafeRegistryHandle handle, RegistryView view)RegistrySecurityGetAccessControl()RegistrySecurityGetAccessControl(AccessControlSections includeSections)SafeRegistryHandlegetHandle()java.lang.StringgetJCOAssemblyName()Returns the reflected Assembly namejava.lang.StringgetJCOClassName()Returns the reflected Class namejava.lang.ObjectgetJCOInstance()Returns the instantiated classjava.lang.StringgetJCOObjectName()Returns the reflected Class name used to build the objectJCTypegetJCOType()Returns the instantiated class Typejava.lang.StringgetName()intgetSubKeyCount()java.lang.String[]GetSubKeyNames()NetObjectGetValue(java.lang.String name)NetObjectGetValue(java.lang.String name, NetObject defaultValue)NetObjectGetValue(java.lang.String name, NetObject defaultValue, RegistryValueOptions options)intgetValueCount()RegistryValueKindGetValueKind(java.lang.String name)java.lang.String[]GetValueNames()RegistryViewgetView()static RegistryKeyOpenBaseKey(RegistryHive hKey, RegistryView view)static RegistryKeyOpenRemoteBaseKey(RegistryHive hKey, java.lang.String machineName)static RegistryKeyOpenRemoteBaseKey(RegistryHive hKey, java.lang.String machineName, RegistryView view)RegistryKeyOpenSubKey(java.lang.String name)RegistryKeyOpenSubKey(java.lang.String name, boolean writable)RegistryKeyOpenSubKey(java.lang.String name, RegistryKeyPermissionCheck permissionCheck)RegistryKeyOpenSubKey(java.lang.String name, RegistryKeyPermissionCheck permissionCheck, RegistryRights rights)RegistryKeyOpenSubKey(java.lang.String name, RegistryRights rights)voidSetAccessControl(RegistrySecurity registrySecurity)voidsetJCOInstance(JCObject instance)voidSetValue(java.lang.String name, NetObject value)voidSetValue(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:IJCOBridgeReflectedReturns the reflected Assembly name- Specified by:
getJCOAssemblyNamein interfaceIJCOBridgeReflected- Overrides:
getJCOAssemblyNamein classMarshalByRefObject- Returns:
- A
Stringrepresenting the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name- Specified by:
getJCOClassNamein interfaceIJCOBridgeReflected- Overrides:
getJCOClassNamein classMarshalByRefObject- Returns:
- A
Stringrepresenting the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflectedReturns the reflected Class name used to build the object- Specified by:
getJCOObjectNamein interfaceIJCOBridgeReflected- Overrides:
getJCOObjectNamein classMarshalByRefObject- Returns:
- A
Stringrepresenting the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class- Specified by:
getJCOInstancein interfaceIJCOBridgeReflected- Overrides:
getJCOInstancein classMarshalByRefObject- Returns:
- An
Objectrepresenting the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstancein classMarshalByRefObject
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflectedReturns the instantiated class Type- Specified by:
getJCOTypein interfaceIJCOBridgeReflected- Overrides:
getJCOTypein classMarshalByRefObject- Returns:
- A
JCTyperepresenting the CLR Type of the instantiated Class
-
cast
public static RegistryKey cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflectedinstance intoRegistryKey, a cast assert is made to check if types are compatible.- Parameters:
from-IJCOBridgeReflectedinstance to be casted- Returns:
RegistryKeyinstance- 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.ThrowableArgumentNullExceptionArgumentException
-
FromHandle
public static RegistryKey FromHandle(SafeRegistryHandle handle, RegistryView view) throws java.lang.Throwable, ArgumentNullException, ArgumentException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentException
-
OpenBaseKey
public static RegistryKey OpenBaseKey(RegistryHive hKey, RegistryView view) throws java.lang.Throwable, ArgumentException, ArgumentNullException, ArgumentOutOfRangeException, FormatException
- Throws:
java.lang.ThrowableArgumentExceptionArgumentNullExceptionArgumentOutOfRangeExceptionFormatException
-
OpenRemoteBaseKey
public static RegistryKey OpenRemoteBaseKey(RegistryHive hKey, java.lang.String machineName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, FormatException, UnauthorizedAccessException, IOException
- Throws:
java.lang.ThrowableArgumentNullExceptionArgumentExceptionFormatExceptionUnauthorizedAccessExceptionIOException
-
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.ThrowableArgumentNullExceptionArgumentExceptionArgumentOutOfRangeExceptionFormatExceptionUnauthorizedAccessExceptionIOException
-
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.ThrowableArgumentNullExceptionTypeLoadExceptionArgumentExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionNotSupportedExceptionCultureNotFoundExceptionArgumentOutOfRangeExceptionOutOfMemoryExceptionFormatExceptionIndexOutOfRangeExceptionObjectDisposedExceptionUnauthorizedAccessExceptionIOException
-
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.ThrowableObjectDisposedExceptionArgumentNullExceptionArgumentExceptionArgumentOutOfRangeExceptionFormatExceptionOutOfMemoryExceptionUnauthorizedAccessExceptionInvalidOperationExceptionPrivilegeNotHeldExceptionSystemExceptionOverflowExceptionIndexOutOfRangeExceptionNullReferenceExceptionNotSupportedException
-
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.ThrowableObjectDisposedExceptionArgumentNullExceptionArgumentExceptionInvalidOperationExceptionMissingMethodExceptionTargetInvocationExceptionArgumentOutOfRangeExceptionFormatExceptionOutOfMemoryExceptionUnauthorizedAccessExceptionPrivilegeNotHeldExceptionSystemExceptionOverflowExceptionIndexOutOfRangeExceptionNullReferenceExceptionNotSupportedException
-
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.ThrowableObjectDisposedExceptionUnauthorizedAccessExceptionArgumentNullExceptionFormatExceptionArgumentExceptionIndexOutOfRangeException
-
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.ThrowableObjectDisposedExceptionUnauthorizedAccessExceptionArgumentNullExceptionFormatExceptionArgumentExceptionIndexOutOfRangeExceptionArgumentOutOfRangeExceptionNullReferenceExceptionNotSupportedExceptionInvalidOperationExceptionOutOfMemoryExceptionPrivilegeNotHeldExceptionInvalidProgramException
-
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:
closein 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.ThrowableObjectDisposedException
-
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.ThrowableObjectDisposedException
-
-