From f47ec80cf941f58eeb689e4166c3180db31f7941 Mon Sep 17 00:00:00 2001 From: Ralph Niemitz Date: Wed, 26 Jul 2017 16:02:55 +0200 Subject: [PATCH] Release 1.0.0 Signed-off-by: Ralph Niemitz --- docs/allclasses-frame.html | 22 + docs/allclasses-noframe.html | 22 + docs/constant-values.html | 186 ++++++ docs/de/ralleytn/simple/registry/Key.html | 501 +++++++++++++++ .../de/ralleytn/simple/registry/Registry.html | 460 ++++++++++++++ .../ralleytn/simple/registry/Value.Type.html | 501 +++++++++++++++ docs/de/ralleytn/simple/registry/Value.html | 366 +++++++++++ .../simple/registry/class-use/Key.html | 168 +++++ .../simple/registry/class-use/Registry.html | 122 ++++ .../simple/registry/class-use/Value.Type.html | 190 ++++++ .../simple/registry/class-use/Value.html | 164 +++++ .../simple/registry/package-frame.html | 26 + .../simple/registry/package-summary.html | 171 ++++++ .../simple/registry/package-tree.html | 145 +++++ .../ralleytn/simple/registry/package-use.html | 152 +++++ docs/deprecated-list.html | 122 ++++ docs/help-doc.html | 223 +++++++ docs/index-files/index-1.html | 131 ++++ docs/index-files/index-2.html | 164 +++++ docs/index-files/index-3.html | 137 +++++ docs/index-files/index-4.html | 129 ++++ docs/index-files/index-5.html | 127 ++++ docs/index-files/index-6.html | 133 ++++ docs/index-files/index-7.html | 137 +++++ docs/index-files/index-8.html | 129 ++++ docs/index-files/index-9.html | 142 +++++ docs/index.html | 72 +++ docs/overview-tree.html | 149 +++++ docs/package-list | 1 + docs/script.js | 30 + docs/stylesheet.css | 574 ++++++++++++++++++ src/de/ralleytn/simple/registry/Key.java | 269 ++++++++ src/de/ralleytn/simple/registry/Registry.java | 201 ++++++ src/de/ralleytn/simple/registry/Value.java | 281 +++++++++ 34 files changed, 6347 insertions(+) create mode 100644 docs/allclasses-frame.html create mode 100644 docs/allclasses-noframe.html create mode 100644 docs/constant-values.html create mode 100644 docs/de/ralleytn/simple/registry/Key.html create mode 100644 docs/de/ralleytn/simple/registry/Registry.html create mode 100644 docs/de/ralleytn/simple/registry/Value.Type.html create mode 100644 docs/de/ralleytn/simple/registry/Value.html create mode 100644 docs/de/ralleytn/simple/registry/class-use/Key.html create mode 100644 docs/de/ralleytn/simple/registry/class-use/Registry.html create mode 100644 docs/de/ralleytn/simple/registry/class-use/Value.Type.html create mode 100644 docs/de/ralleytn/simple/registry/class-use/Value.html create mode 100644 docs/de/ralleytn/simple/registry/package-frame.html create mode 100644 docs/de/ralleytn/simple/registry/package-summary.html create mode 100644 docs/de/ralleytn/simple/registry/package-tree.html create mode 100644 docs/de/ralleytn/simple/registry/package-use.html create mode 100644 docs/deprecated-list.html create mode 100644 docs/help-doc.html create mode 100644 docs/index-files/index-1.html create mode 100644 docs/index-files/index-2.html create mode 100644 docs/index-files/index-3.html create mode 100644 docs/index-files/index-4.html create mode 100644 docs/index-files/index-5.html create mode 100644 docs/index-files/index-6.html create mode 100644 docs/index-files/index-7.html create mode 100644 docs/index-files/index-8.html create mode 100644 docs/index-files/index-9.html create mode 100644 docs/index.html create mode 100644 docs/overview-tree.html create mode 100644 docs/package-list create mode 100644 docs/script.js create mode 100644 docs/stylesheet.css create mode 100644 src/de/ralleytn/simple/registry/Key.java create mode 100644 src/de/ralleytn/simple/registry/Registry.java create mode 100644 src/de/ralleytn/simple/registry/Value.java diff --git a/docs/allclasses-frame.html b/docs/allclasses-frame.html new file mode 100644 index 0000000..75fcd99 --- /dev/null +++ b/docs/allclasses-frame.html @@ -0,0 +1,22 @@ + + + + + +All Classes + + + + + +

All Classes

+ + + diff --git a/docs/allclasses-noframe.html b/docs/allclasses-noframe.html new file mode 100644 index 0000000..f628741 --- /dev/null +++ b/docs/allclasses-noframe.html @@ -0,0 +1,22 @@ + + + + + +All Classes + + + + + +

All Classes

+ + + diff --git a/docs/constant-values.html b/docs/constant-values.html new file mode 100644 index 0000000..e03e21a --- /dev/null +++ b/docs/constant-values.html @@ -0,0 +1,186 @@ + + + + + +Constant Field Values + + + + + + + + + + + +
+

Constant Field Values

+

Contents

+ +
+
+ + +

de.ralleytn.*

+ +
+ + + + + + diff --git a/docs/de/ralleytn/simple/registry/Key.html b/docs/de/ralleytn/simple/registry/Key.html new file mode 100644 index 0000000..734a6dd --- /dev/null +++ b/docs/de/ralleytn/simple/registry/Key.html @@ -0,0 +1,501 @@ + + + + + +Key + + + + + + + + + + + + +
+
de.ralleytn.simple.registry
+

Class Key

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.ralleytn.simple.registry.Key
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public final class Key
    +extends java.lang.Object
    +
    Represents a key in the registry.
    +
    +
    Since:
    +
    1.0.0
    +
    Version:
    +
    1.0.0
    +
    Author:
    +
    Ralph Niemitz/RalleYTN(ralph.niemitz@gmx.de)
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        reload

        +
        public void reload()
        +            throws java.io.IOException
        +
        Reloads the key. Should be called after setting or deleting values.
        +
        +
        Throws:
        +
        java.io.IOException - if an error occurs
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        setDefaultValue

        +
        public void setDefaultValue(Value.Type type,
        +                            char seperator,
        +                            java.lang.String rawValue)
        +                     throws java.io.IOException
        +
        Sets the default value.
        +
        +
        Parameters:
        +
        type - data type of value data
        +
        seperator - only important when the data type is Value.Type.REG_MULTI_SZ; specifies at which character the string should be split; some characters do not work as seperator and simply do nothing like '|' for instance
        +
        rawValue - the raw value data
        +
        Throws:
        +
        java.io.IOException - if an error occurs
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        setValue

        +
        public void setValue(java.lang.String name,
        +                     Value.Type type,
        +                     char seperator,
        +                     java.lang.String rawValue)
        +              throws java.io.IOException
        +
        Sets a value.
        +
        +
        Parameters:
        +
        name - the value name
        +
        type - data type of value data
        +
        seperator - only important when the data type is Value.Type.REG_MULTI_SZ; specifies at which character the string should be split; some characters do not work as seperator and simply do nothing like '|' for instance
        +
        rawValue - the raw value data
        +
        Throws:
        +
        java.io.IOException - if an error occurs
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        getDefaultValue

        +
        public Value getDefaultValue()
        +
        +
        Returns:
        +
        the default value
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        getPath

        +
        public java.lang.String getPath()
        +
        +
        Returns:
        +
        this key's path
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        getName

        +
        public java.lang.String getName()
        +
        +
        Returns:
        +
        the name of this key
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        getChild

        +
        public Key getChild(java.lang.String name)
        +             throws java.io.IOException
        +
        +
        Parameters:
        +
        name - name of the child
        +
        Returns:
        +
        the child with the specified name, or null if this key has no child with that name; case insensitive
        +
        Throws:
        +
        java.io.IOException - if an error occurs
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        getChilds

        +
        public java.util.List<Key> getChilds()
        +                              throws java.io.IOException
        +
        +
        Returns:
        +
        all childs of this key
        +
        Throws:
        +
        java.io.IOException - if an error occurs
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        getParent

        +
        public Key getParent()
        +              throws java.io.IOException
        +
        +
        Returns:
        +
        the parent of this key
        +
        Throws:
        +
        java.io.IOException - if an error occurs
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        getValues

        +
        public java.util.List<Value> getValues()
        +
        +
        Returns:
        +
        all values of this key
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        getValueByName

        +
        public Value getValueByName(java.lang.String name)
        +
        +
        Parameters:
        +
        name - value name
        +
        Returns:
        +
        the value if the specified name, or null if no value was found; case insensitive
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/de/ralleytn/simple/registry/Registry.html b/docs/de/ralleytn/simple/registry/Registry.html new file mode 100644 index 0000000..b373263 --- /dev/null +++ b/docs/de/ralleytn/simple/registry/Registry.html @@ -0,0 +1,460 @@ + + + + + +Registry + + + + + + + + + + + + +
+
de.ralleytn.simple.registry
+

Class Registry

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.ralleytn.simple.registry.Registry
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public final class Registry
    +extends java.lang.Object
    +
    Provides access to the Windows registry file.
    +
    +
    Since:
    +
    1.0.0
    +
    Version:
    +
    1.0.0
    +
    Author:
    +
    Ralph Niemitz/RalleYTN(ralph.niemitz@gmx.de)
    +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static voiddeleteKey(java.lang.String path) +
      Deletes a key.
      +
      static KeygetKey(java.lang.String path) 
      static voidmain(java.lang.String[] args) 
      static voidsetKey(java.lang.String path) +
      Adds or replaces a key.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Field Detail

      + + + +
        +
      • +

        HKEY_CLASSES_ROOT

        +
        public static final java.lang.String HKEY_CLASSES_ROOT
        +
        +
        Since:
        +
        1.0.0
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        HKEY_CURRENT_USER

        +
        public static final java.lang.String HKEY_CURRENT_USER
        +
        +
        Since:
        +
        1.0.0
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        HKEY_LOCAL_MASHINE

        +
        public static final java.lang.String HKEY_LOCAL_MASHINE
        +
        +
        Since:
        +
        1.0.0
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        HKEY_USERS

        +
        public static final java.lang.String HKEY_USERS
        +
        +
        Since:
        +
        1.0.0
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        HKEY_CURRENT_CONFIG

        +
        public static final java.lang.String HKEY_CURRENT_CONFIG
        +
        +
        Since:
        +
        1.0.0
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      + + + +
        +
      • +

        HKEY_DYN_DATA

        +
        public static final java.lang.String HKEY_DYN_DATA
        +
        +
        Since:
        +
        1.0.0
        +
        See Also:
        +
        Constant Field Values
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        main

        +
        public static void main(java.lang.String[] args)
        +                 throws java.io.IOException
        +
        +
        Throws:
        +
        java.io.IOException
        +
        +
      • +
      + + + +
        +
      • +

        deleteKey

        +
        public static final void deleteKey(java.lang.String path)
        +                            throws java.io.IOException
        +
        Deletes a key. It will be deleted without asking!
        +
        +
        Parameters:
        +
        path - path of the key
        +
        Throws:
        +
        java.io.IOException - if an error occurs
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        setKey

        +
        public static final void setKey(java.lang.String path)
        +                         throws java.io.IOException
        +
        Adds or replaces a key. Keys will be replaced without asking first!
        +
        +
        Parameters:
        +
        path - path of the key
        +
        Throws:
        +
        java.io.IOException - if an error occurs
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        getKey

        +
        public static final Key getKey(java.lang.String path)
        +                        throws java.io.IOException
        +
        +
        Parameters:
        +
        path - path of the key
        +
        Returns:
        +
        key with the specified path
        +
        Throws:
        +
        java.io.IOException - if an error occurs
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/de/ralleytn/simple/registry/Value.Type.html b/docs/de/ralleytn/simple/registry/Value.Type.html new file mode 100644 index 0000000..0cc4334 --- /dev/null +++ b/docs/de/ralleytn/simple/registry/Value.Type.html @@ -0,0 +1,501 @@ + + + + + +Value.Type + + + + + + + + + + + + +
+
de.ralleytn.simple.registry
+

Enum Value.Type

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • java.lang.Enum<Value.Type>
    • +
    • +
        +
      • de.ralleytn.simple.registry.Value.Type
      • +
      +
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    java.io.Serializable, java.lang.Comparable<Value.Type>
    +
    +
    +
    Enclosing class:
    +
    Value
    +
    +
    +
    +
    public static enum Value.Type
    +extends java.lang.Enum<Value.Type>
    +
    Represents the data type of a value in a registry key.
    +
    +
    Since:
    +
    1.0.0
    +
    Version:
    +
    1.0.0
    +
    Author:
    +
    Ralph Niemitz/RalleYTN(ralph.niemitz@gmx.de)
    +
    +
  • +
+
+
+
    +
  • + + + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + +
      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethod and Description
      static Value.TypegetTypeByName(java.lang.String name) 
      static Value.TypevalueOf(java.lang.String name) +
      Returns the enum constant of this type with the specified name.
      +
      static Value.Type[]values() +
      Returns an array containing the constants of this enum type, in +the order they are declared.
      +
      +
        +
      • + + +

        Methods inherited from class java.lang.Enum

        +compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • +
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +getClass, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Enum Constant Detail

      + + + +
        +
      • +

        REG_BINARY

        +
        public static final Value.Type REG_BINARY
        +
        byte[]
        +
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        REG_DWORD

        +
        public static final Value.Type REG_DWORD
        +
        int
        +
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        REG_QWORD

        +
        public static final Value.Type REG_QWORD
        +
        long
        +
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        REG_SZ

        +
        public static final Value.Type REG_SZ
        +
        String
        +
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        REG_EXPAND_SZ

        +
        public static final Value.Type REG_EXPAND_SZ
        +
        String
        +
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        REG_MULTI_SZ

        +
        public static final Value.Type REG_MULTI_SZ
        +
        List<String>
        +
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        REG_FULL_RESOURCE_DESCRIPTOR

        +
        public static final Value.Type REG_FULL_RESOURCE_DESCRIPTOR
        +
        String
        +
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        REG_NONE

        +
        public static final Value.Type REG_NONE
        +
        String
        +
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      +
    • +
    + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        values

        +
        public static Value.Type[] values()
        +
        Returns an array containing the constants of this enum type, in +the order they are declared. This method may be used to iterate +over the constants as follows: +
        +for (Value.Type c : Value.Type.values())
        +    System.out.println(c);
        +
        +
        +
        Returns:
        +
        an array containing the constants of this enum type, in the order they are declared
        +
        +
      • +
      + + + +
        +
      • +

        valueOf

        +
        public static Value.Type valueOf(java.lang.String name)
        +
        Returns the enum constant of this type with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this type. (Extraneous whitespace characters are +not permitted.)
        +
        +
        Parameters:
        +
        name - the name of the enum constant to be returned.
        +
        Returns:
        +
        the enum constant with the specified name
        +
        Throws:
        +
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        +
        java.lang.NullPointerException - if the argument is null
        +
        +
      • +
      + + + +
        +
      • +

        getTypeByName

        +
        public static final Value.Type getTypeByName(java.lang.String name)
        +
        +
        Parameters:
        +
        name - data type name
        +
        Returns:
        +
        the data type with the specified name, or null if no such data type exists
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/de/ralleytn/simple/registry/Value.html b/docs/de/ralleytn/simple/registry/Value.html new file mode 100644 index 0000000..b920a37 --- /dev/null +++ b/docs/de/ralleytn/simple/registry/Value.html @@ -0,0 +1,366 @@ + + + + + +Value + + + + + + + + + + + + +
+
de.ralleytn.simple.registry
+

Class Value

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • de.ralleytn.simple.registry.Value
    • +
    +
  • +
+
+
    +
  • +
    +
    +
    public final class Value
    +extends java.lang.Object
    +
    Represents a value of a registry key.
    +
    +
    Since:
    +
    1.0.0
    +
    Version:
    +
    1.0.0
    +
    Author:
    +
    Ralph Niemitz/RalleYTN(ralph.niemitz@gmx.de)
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Nested Class Summary

      + + + + + + + + + + +
      Nested Classes 
      Modifier and TypeClass and Description
      static class Value.Type +
      Represents the data type of a value in a registry key.
      +
      +
    • +
    + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Concrete Methods 
      Modifier and TypeMethod and Description
      java.lang.StringgetName() 
      java.lang.StringgetRawValue() 
      Value.TypegetType() 
      java.lang.ObjectgetValue() +
      + REG_BINARY = byte[] + REG_DWORD = int + REG_QWORD = long + REG_SZ = String + REG_EXPAND_SZ = String + REG_MULTI_SZ = List<String> + REG_FULL_RESOURCE_DESCRIPTOR = String + REG_NONE = String +
      +
      java.lang.StringtoString() 
      +
        +
      • + + +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • +
      +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getName

        +
        public final java.lang.String getName()
        +
        +
        Returns:
        +
        value name
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        getType

        +
        public final Value.Type getType()
        +
        +
        Returns:
        +
        data type of value
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        getRawValue

        +
        public final java.lang.String getRawValue()
        +
        +
        Returns:
        +
        raw value data
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        getValue

        +
        public final java.lang.Object getValue()
        +
          +
        • REG_BINARY = byte[]
        • +
        • REG_DWORD = int
        • +
        • REG_QWORD = long
        • +
        • REG_SZ = String
        • +
        • REG_EXPAND_SZ = String
        • +
        • REG_MULTI_SZ = List<String>
        • +
        • REG_FULL_RESOURCE_DESCRIPTOR = String
        • +
        • REG_NONE = String
        • +
        +
        +
        Returns:
        +
        value data
        +
        Since:
        +
        1.0.0
        +
        +
      • +
      + + + +
        +
      • +

        toString

        +
        public java.lang.String toString()
        +
        +
        Overrides:
        +
        toString in class java.lang.Object
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + + + diff --git a/docs/de/ralleytn/simple/registry/class-use/Key.html b/docs/de/ralleytn/simple/registry/class-use/Key.html new file mode 100644 index 0000000..df120f4 --- /dev/null +++ b/docs/de/ralleytn/simple/registry/class-use/Key.html @@ -0,0 +1,168 @@ + + + + + +Uses of Class de.ralleytn.simple.registry.Key + + + + + + + + + + + +
+

Uses of Class
de.ralleytn.simple.registry.Key

+
+
+ +
+ + + + + + diff --git a/docs/de/ralleytn/simple/registry/class-use/Registry.html b/docs/de/ralleytn/simple/registry/class-use/Registry.html new file mode 100644 index 0000000..b37be61 --- /dev/null +++ b/docs/de/ralleytn/simple/registry/class-use/Registry.html @@ -0,0 +1,122 @@ + + + + + +Uses of Class de.ralleytn.simple.registry.Registry + + + + + + + + + + + +
+

Uses of Class
de.ralleytn.simple.registry.Registry

+
+
No usage of de.ralleytn.simple.registry.Registry
+ + + + + + diff --git a/docs/de/ralleytn/simple/registry/class-use/Value.Type.html b/docs/de/ralleytn/simple/registry/class-use/Value.Type.html new file mode 100644 index 0000000..5b340c5 --- /dev/null +++ b/docs/de/ralleytn/simple/registry/class-use/Value.Type.html @@ -0,0 +1,190 @@ + + + + + +Uses of Class de.ralleytn.simple.registry.Value.Type + + + + + + + + + + + +
+

Uses of Class
de.ralleytn.simple.registry.Value.Type

+
+
+ +
+ + + + + + diff --git a/docs/de/ralleytn/simple/registry/class-use/Value.html b/docs/de/ralleytn/simple/registry/class-use/Value.html new file mode 100644 index 0000000..ad942da --- /dev/null +++ b/docs/de/ralleytn/simple/registry/class-use/Value.html @@ -0,0 +1,164 @@ + + + + + +Uses of Class de.ralleytn.simple.registry.Value + + + + + + + + + + + +
+

Uses of Class
de.ralleytn.simple.registry.Value

+
+
+ +
+ + + + + + diff --git a/docs/de/ralleytn/simple/registry/package-frame.html b/docs/de/ralleytn/simple/registry/package-frame.html new file mode 100644 index 0000000..b94372c --- /dev/null +++ b/docs/de/ralleytn/simple/registry/package-frame.html @@ -0,0 +1,26 @@ + + + + + +de.ralleytn.simple.registry + + + + + +

de.ralleytn.simple.registry

+
+

Classes

+ +

Enums

+ +
+ + diff --git a/docs/de/ralleytn/simple/registry/package-summary.html b/docs/de/ralleytn/simple/registry/package-summary.html new file mode 100644 index 0000000..865a80c --- /dev/null +++ b/docs/de/ralleytn/simple/registry/package-summary.html @@ -0,0 +1,171 @@ + + + + + +de.ralleytn.simple.registry + + + + + + + + + + + +
+

Package de.ralleytn.simple.registry

+
+
+
    +
  • + + + + + + + + + + + + + + + + + + + + +
    Class Summary 
    ClassDescription
    Key +
    Represents a key in the registry.
    +
    Registry +
    Provides access to the Windows registry file.
    +
    Value +
    Represents a value of a registry key.
    +
    +
  • +
  • + + + + + + + + + + + + +
    Enum Summary 
    EnumDescription
    Value.Type +
    Represents the data type of a value in a registry key.
    +
    +
  • +
+
+ + + + + + diff --git a/docs/de/ralleytn/simple/registry/package-tree.html b/docs/de/ralleytn/simple/registry/package-tree.html new file mode 100644 index 0000000..aaca4ae --- /dev/null +++ b/docs/de/ralleytn/simple/registry/package-tree.html @@ -0,0 +1,145 @@ + + + + + +de.ralleytn.simple.registry Class Hierarchy + + + + + + + + + + + +
+

Hierarchy For Package de.ralleytn.simple.registry

+
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • de.ralleytn.simple.registry.Key
    • +
    • de.ralleytn.simple.registry.Registry
    • +
    • de.ralleytn.simple.registry.Value
    • +
    +
  • +
+

Enum Hierarchy

+
    +
  • java.lang.Object +
      +
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) + +
    • +
    +
  • +
+
+ + + + + + diff --git a/docs/de/ralleytn/simple/registry/package-use.html b/docs/de/ralleytn/simple/registry/package-use.html new file mode 100644 index 0000000..9631655 --- /dev/null +++ b/docs/de/ralleytn/simple/registry/package-use.html @@ -0,0 +1,152 @@ + + + + + +Uses of Package de.ralleytn.simple.registry + + + + + + + + + + + +
+

Uses of Package
de.ralleytn.simple.registry

+
+
+ +
+ + + + + + diff --git a/docs/deprecated-list.html b/docs/deprecated-list.html new file mode 100644 index 0000000..3d56c7f --- /dev/null +++ b/docs/deprecated-list.html @@ -0,0 +1,122 @@ + + + + + +Deprecated List + + + + + + + + +
+ + + + + + + +
+ + +
+

Deprecated API

+

Contents

+
+ +
+ + + + + + + +
+ + + + diff --git a/docs/help-doc.html b/docs/help-doc.html new file mode 100644 index 0000000..ef2d235 --- /dev/null +++ b/docs/help-doc.html @@ -0,0 +1,223 @@ + + + + + +API Help + + + + + + + + + + + +
+

How This API Document Is Organized

+
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+
+
+
    +
  • +

    Package

    +

    Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:

    +
      +
    • Interfaces (italic)
    • +
    • Classes
    • +
    • Enums
    • +
    • Exceptions
    • +
    • Errors
    • +
    • Annotation Types
    • +
    +
  • +
  • +

    Class/Interface

    +

    Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

    +
      +
    • Class inheritance diagram
    • +
    • Direct Subclasses
    • +
    • All Known Subinterfaces
    • +
    • All Known Implementing Classes
    • +
    • Class/interface declaration
    • +
    • Class/interface description
    • +
    +
      +
    • Nested Class Summary
    • +
    • Field Summary
    • +
    • Constructor Summary
    • +
    • Method Summary
    • +
    +
      +
    • Field Detail
    • +
    • Constructor Detail
    • +
    • Method Detail
    • +
    +

    Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

    +
  • +
  • +

    Annotation Type

    +

    Each annotation type has its own separate page with the following sections:

    +
      +
    • Annotation Type declaration
    • +
    • Annotation Type description
    • +
    • Required Element Summary
    • +
    • Optional Element Summary
    • +
    • Element Detail
    • +
    +
  • +
  • +

    Enum

    +

    Each enum has its own separate page with the following sections:

    +
      +
    • Enum declaration
    • +
    • Enum description
    • +
    • Enum Constant Summary
    • +
    • Enum Constant Detail
    • +
    +
  • +
  • +

    Use

    +

    Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.

    +
  • +
  • +

    Tree (Class Hierarchy)

    +

    There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.

    +
      +
    • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
    • +
    • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
    • +
    +
  • +
  • +

    Deprecated API

    +

    The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

    +
  • +
  • +

    Index

    +

    The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

    +
  • +
  • +

    Prev/Next

    +

    These links take you to the next or previous class, interface, package, or related page.

    +
  • +
  • +

    Frames/No Frames

    +

    These links show and hide the HTML frames. All pages are available with or without frames.

    +
  • +
  • +

    All Classes

    +

    The All Classes link shows all classes and interfaces except non-static nested types.

    +
  • +
  • +

    Serialized Form

    +

    Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

    +
  • +
  • +

    Constant Field Values

    +

    The Constant Field Values page lists the static final fields and their values.

    +
  • +
+This help file applies to API documentation generated using the standard doclet.
+ + + + + + diff --git a/docs/index-files/index-1.html b/docs/index-files/index-1.html new file mode 100644 index 0000000..49217dd --- /dev/null +++ b/docs/index-files/index-1.html @@ -0,0 +1,131 @@ + + + + + +D-Index + + + + + + + + +
+ + + + + + + +
+ + +
D G H K M R S T V  + + +

D

+
+
de.ralleytn.simple.registry - package de.ralleytn.simple.registry
+
 
+
deleteKey(String) - Static method in class de.ralleytn.simple.registry.Registry
+
+
Deletes a key.
+
+
+D G H K M R S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index-files/index-2.html b/docs/index-files/index-2.html new file mode 100644 index 0000000..fca7d3c --- /dev/null +++ b/docs/index-files/index-2.html @@ -0,0 +1,164 @@ + + + + + +G-Index + + + + + + + + +
+ + + + + + + +
+ + +
D G H K M R S T V  + + +

G

+
+
getChild(String) - Method in class de.ralleytn.simple.registry.Key
+
 
+
getChilds() - Method in class de.ralleytn.simple.registry.Key
+
 
+
getDefaultValue() - Method in class de.ralleytn.simple.registry.Key
+
 
+
getKey(String) - Static method in class de.ralleytn.simple.registry.Registry
+
 
+
getName() - Method in class de.ralleytn.simple.registry.Key
+
 
+
getName() - Method in class de.ralleytn.simple.registry.Value
+
 
+
getParent() - Method in class de.ralleytn.simple.registry.Key
+
 
+
getPath() - Method in class de.ralleytn.simple.registry.Key
+
 
+
getRawValue() - Method in class de.ralleytn.simple.registry.Value
+
 
+
getType() - Method in class de.ralleytn.simple.registry.Value
+
 
+
getTypeByName(String) - Static method in enum de.ralleytn.simple.registry.Value.Type
+
 
+
getValue() - Method in class de.ralleytn.simple.registry.Value
+
+
+ REG_BINARY = byte[] + REG_DWORD = int + REG_QWORD = long + REG_SZ = String + REG_EXPAND_SZ = String + REG_MULTI_SZ = List<String> + REG_FULL_RESOURCE_DESCRIPTOR = String + REG_NONE = String +
+
+
getValueByName(String) - Method in class de.ralleytn.simple.registry.Key
+
 
+
getValues() - Method in class de.ralleytn.simple.registry.Key
+
 
+
+D G H K M R S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index-files/index-3.html b/docs/index-files/index-3.html new file mode 100644 index 0000000..fd3d411 --- /dev/null +++ b/docs/index-files/index-3.html @@ -0,0 +1,137 @@ + + + + + +H-Index + + + + + + + + +
+ + + + + + + +
+ + +
D G H K M R S T V  + + +

H

+
+
HKEY_CLASSES_ROOT - Static variable in class de.ralleytn.simple.registry.Registry
+
 
+
HKEY_CURRENT_CONFIG - Static variable in class de.ralleytn.simple.registry.Registry
+
 
+
HKEY_CURRENT_USER - Static variable in class de.ralleytn.simple.registry.Registry
+
 
+
HKEY_DYN_DATA - Static variable in class de.ralleytn.simple.registry.Registry
+
 
+
HKEY_LOCAL_MASHINE - Static variable in class de.ralleytn.simple.registry.Registry
+
 
+
HKEY_USERS - Static variable in class de.ralleytn.simple.registry.Registry
+
 
+
+D G H K M R S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index-files/index-4.html b/docs/index-files/index-4.html new file mode 100644 index 0000000..81ed833 --- /dev/null +++ b/docs/index-files/index-4.html @@ -0,0 +1,129 @@ + + + + + +K-Index + + + + + + + + +
+ + + + + + + +
+ + +
D G H K M R S T V  + + +

K

+
+
Key - Class in de.ralleytn.simple.registry
+
+
Represents a key in the registry.
+
+
+D G H K M R S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index-files/index-5.html b/docs/index-files/index-5.html new file mode 100644 index 0000000..0eeac7d --- /dev/null +++ b/docs/index-files/index-5.html @@ -0,0 +1,127 @@ + + + + + +M-Index + + + + + + + + +
+ + + + + + + +
+ + +
D G H K M R S T V  + + +

M

+
+
main(String[]) - Static method in class de.ralleytn.simple.registry.Registry
+
 
+
+D G H K M R S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index-files/index-6.html b/docs/index-files/index-6.html new file mode 100644 index 0000000..938b8d5 --- /dev/null +++ b/docs/index-files/index-6.html @@ -0,0 +1,133 @@ + + + + + +R-Index + + + + + + + + +
+ + + + + + + +
+ + +
D G H K M R S T V  + + +

R

+
+
Registry - Class in de.ralleytn.simple.registry
+
+
Provides access to the Windows registry file.
+
+
reload() - Method in class de.ralleytn.simple.registry.Key
+
+
Reloads the key.
+
+
+D G H K M R S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index-files/index-7.html b/docs/index-files/index-7.html new file mode 100644 index 0000000..335b4c1 --- /dev/null +++ b/docs/index-files/index-7.html @@ -0,0 +1,137 @@ + + + + + +S-Index + + + + + + + + +
+ + + + + + + +
+ + +
D G H K M R S T V  + + +

S

+
+
setDefaultValue(Value.Type, char, String) - Method in class de.ralleytn.simple.registry.Key
+
+
Sets the default value.
+
+
setKey(String) - Static method in class de.ralleytn.simple.registry.Registry
+
+
Adds or replaces a key.
+
+
setValue(String, Value.Type, char, String) - Method in class de.ralleytn.simple.registry.Key
+
+
Sets a value.
+
+
+D G H K M R S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index-files/index-8.html b/docs/index-files/index-8.html new file mode 100644 index 0000000..3f1122b --- /dev/null +++ b/docs/index-files/index-8.html @@ -0,0 +1,129 @@ + + + + + +T-Index + + + + + + + + +
+ + + + + + + +
+ + +
D G H K M R S T V  + + +

T

+
+
toString() - Method in class de.ralleytn.simple.registry.Key
+
 
+
toString() - Method in class de.ralleytn.simple.registry.Value
+
 
+
+D G H K M R S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index-files/index-9.html b/docs/index-files/index-9.html new file mode 100644 index 0000000..9664aa8 --- /dev/null +++ b/docs/index-files/index-9.html @@ -0,0 +1,142 @@ + + + + + +V-Index + + + + + + + + +
+ + + + + + + +
+ + +
D G H K M R S T V  + + +

V

+
+
Value - Class in de.ralleytn.simple.registry
+
+
Represents a value of a registry key.
+
+
Value.Type - Enum in de.ralleytn.simple.registry
+
+
Represents the data type of a value in a registry key.
+
+
valueOf(String) - Static method in enum de.ralleytn.simple.registry.Value.Type
+
+
Returns the enum constant of this type with the specified name.
+
+
values() - Static method in enum de.ralleytn.simple.registry.Value.Type
+
+
Returns an array containing the constants of this enum type, in +the order they are declared.
+
+
+D G H K M R S T V 
+ +
+ + + + + + + +
+ + + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..7082c9b --- /dev/null +++ b/docs/index.html @@ -0,0 +1,72 @@ + + + + + +Generated Documentation (Untitled) + + + + + + +<noscript> +<div>JavaScript is disabled on your browser.</div> +</noscript> +<h2>Frame Alert</h2> +<p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="de/ralleytn/simple/registry/package-summary.html">Non-frame version</a>.</p> + + + diff --git a/docs/overview-tree.html b/docs/overview-tree.html new file mode 100644 index 0000000..c01938a --- /dev/null +++ b/docs/overview-tree.html @@ -0,0 +1,149 @@ + + + + + +Class Hierarchy + + + + + + + + + + + +
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+
    +
  • java.lang.Object +
      +
    • de.ralleytn.simple.registry.Key
    • +
    • de.ralleytn.simple.registry.Registry
    • +
    • de.ralleytn.simple.registry.Value
    • +
    +
  • +
+

Enum Hierarchy

+
    +
  • java.lang.Object +
      +
    • java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable) + +
    • +
    +
  • +
+
+ + + + + + diff --git a/docs/package-list b/docs/package-list new file mode 100644 index 0000000..dbedf30 --- /dev/null +++ b/docs/package-list @@ -0,0 +1 @@ +de.ralleytn.simple.registry diff --git a/docs/script.js b/docs/script.js new file mode 100644 index 0000000..b346356 --- /dev/null +++ b/docs/script.js @@ -0,0 +1,30 @@ +function show(type) +{ + count = 0; + for (var key in methods) { + var row = document.getElementById(key); + if ((methods[key] & type) != 0) { + row.style.display = ''; + row.className = (count++ % 2) ? rowColor : altColor; + } + else + row.style.display = 'none'; + } + updateTabs(type); +} + +function updateTabs(type) +{ + for (var value in tabs) { + var sNode = document.getElementById(tabs[value][0]); + var spanNode = sNode.firstChild; + if (value == type) { + sNode.className = activeTableTab; + spanNode.innerHTML = tabs[value][1]; + } + else { + sNode.className = tableTab; + spanNode.innerHTML = "" + tabs[value][1] + ""; + } + } +} diff --git a/docs/stylesheet.css b/docs/stylesheet.css new file mode 100644 index 0000000..98055b2 --- /dev/null +++ b/docs/stylesheet.css @@ -0,0 +1,574 @@ +/* Javadoc style sheet */ +/* +Overall document style +*/ + +@import url('resources/fonts/dejavu.css'); + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4A6782; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; + font-style:italic; +} +h4 { + font-size:13px; +} +h5 { + font-size:12px; +} +h6 { + font-size:11px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +table tr td dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:11px; + z-index:200; + margin-top:-9px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-color:#4D7A97; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:11px; + margin:0; +} +.topNav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.bottomNav { + margin-top:10px; + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.subNav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +ul.subNavList li{ + list-style:none; + float:left; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.navBarCell1Rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skipNav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader span{ + margin-right:15px; +} +.indexHeader h1 { + font-size:13px; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:12px; +} +.indexContainer h2 { + font-size:13px; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; + padding-top:2px; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:5px 0 10px 0px; + font-size:14px; + font-family:'DejaVu Sans Mono',monospace; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #ededed; + background-color:#f8f8f8; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { + width:100%; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; +} +.overviewSummary, .memberSummary { + padding:0px; +} +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + padding-top:10px; + padding-left:1px; + margin:0px; + white-space:pre; +} +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +.memberSummary caption span.activeTableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#F8981D; + height:16px; +} +.memberSummary caption span.tableTab span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + margin-right:3px; + display:inline-block; + float:left; + background-color:#4D7A97; + height:16px; +} +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + padding-right:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { + display:none; + width:5px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .activeTableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + float:left; + background-color:#F8981D; +} +.memberSummary .tableTab .tabEnd { + display:none; + width:5px; + margin-right:3px; + position:relative; + background-color:#4D7A97; + float:left; + +} +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { + text-align:left; + padding:0px 0px 12px 10px; +} +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:0px; + padding-top:8px; + padding-bottom:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { + background:#dee3e9; + text-align:left; + padding:8px 3px 3px 7px; +} +td.colFirst, th.colFirst { + white-space:nowrap; + font-size:13px; +} +td.colLast, th.colLast { + font-size:13px; +} +td.colOne, th.colOne { + font-size:13px; +} +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.useSummary td.colFirst, .useSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ + width:25%; + vertical-align:top; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color:#EEEEFF; +} +.altColor { + background-color:#FFFFFF; +} +.rowColor { + background-color:#EEEEEF; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} + +ul.blockList ul.blockList ul.blockList li.blockList h3 { + font-style:normal; +} + +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} + +td.colLast div { + padding-top:0px; +} + + +td.colLast a { + padding-bottom:3px; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:3px 10px 2px 0px; + color:#474747; +} +.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink, +.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel, +.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink { + font-weight:bold; +} +.deprecationComment, .emphasizedPhrase, .interfaceName { + font-style:italic; +} + +div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase, +div.block div.block span.interfaceName { + font-style:normal; +} + +div.contentContainer ul.blockList li.blockList h2{ + padding-bottom:0px; +} diff --git a/src/de/ralleytn/simple/registry/Key.java b/src/de/ralleytn/simple/registry/Key.java new file mode 100644 index 0000000..cac3f86 --- /dev/null +++ b/src/de/ralleytn/simple/registry/Key.java @@ -0,0 +1,269 @@ +/* + * MIT License + * + * Copyright (c) 2017 Ralph Niemitz + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package de.ralleytn.simple.registry; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * Represents a key in the registry. + * @author Ralph Niemitz/RalleYTN(ralph.niemitz@gmx.de) + * @version 1.0.0 + * @since 1.0.0 + */ +public final class Key { + + private List childs; + private String parent; + private List values; + private Value defaultValue; + private String name; + private String path; + + Key(String path, String name, List values, Value defaultValue, String parent, List childs) { + + this.path = path; + this.name = name; + this.defaultValue = defaultValue; + this.values = values; + this.parent = parent; + this.childs = childs; + } + + /** + * Reloads the key. Should be called after setting or deleting values. + * @throws IOException if an error occurs + * @since 1.0.0 + */ + public void reload() throws IOException { + + Key key = Registry.getKey(this.path); + + this.childs = key.childs; + this.parent = key.parent; + this.values = key.values; + this.defaultValue = key.defaultValue; + this.name = key.name; + this.path = key.path; + } + + /** + * Sets the default value. + * @param type data type of value data + * @param seperator only important when the data type is {@linkplain Value.Type#REG_MULTI_SZ}; specifies at which character the string should be split; some characters do not work as seperator and simply do nothing like '|' for instance + * @param rawValue the raw value data + * @throws IOException if an error occurs + * @since 1.0.0 + */ + public void setDefaultValue(Value.Type type, char seperator, String rawValue) throws IOException { + + Registry.exec("reg add \"" + path + "\" /ve /t " + type.name() + (type == Value.Type.REG_MULTI_SZ ? " /s " + seperator : "") + " /d \"" + rawValue + "\" /f"); + } + + /** + * Sets a value. + * @param name the value name + * @param type data type of value data + * @param seperator only important when the data type is {@linkplain Value.Type#REG_MULTI_SZ}; specifies at which character the string should be split; some characters do not work as seperator and simply do nothing like '|' for instance + * @param rawValue the raw value data + * @throws IOException if an error occurs + * @since 1.0.0 + */ + public void setValue(String name, Value.Type type, char seperator, String rawValue) throws IOException { + + Registry.exec("reg add \"" + path + "\" /v " + name + " /t " + type.name() + (type == Value.Type.REG_MULTI_SZ ? " /s " + seperator : "") + " /d \"" + rawValue + "\" /f"); + } + + /** + * @return the default value + * @since 1.0.0 + */ + public Value getDefaultValue() { + + return this.defaultValue; + } + + /** + * @return this key's path + * @since 1.0.0 + */ + public String getPath() { + + return this.path; + } + + /** + * @return the name of this key + * @since 1.0.0 + */ + public String getName() { + + return this.name; + } + + /** + * @param name name of the child + * @return the child with the specified name, or {@code null} if this key has no child with that name; case insensitive + * @throws IOException if an error occurs + * @since 1.0.0 + */ + public Key getChild(String name) throws IOException { + + for(String child : this.childs) { + + String[] parts = child.split("\\\\"); + + if(parts[parts.length - 1].toUpperCase().equals(name.toUpperCase())) { + + return Registry.getKey(child); + } + } + + return null; + } + + /** + * @return all childs of this key + * @throws IOException if an error occurs + * @since 1.0.0 + */ + public List getChilds() throws IOException { + + List list = new ArrayList(); + + for(String child : this.childs) { + + list.add(Registry.getKey(child)); + } + + return list; + } + + /** + * @return the parent of this key + * @throws IOException if an error occurs + * @since 1.0.0 + */ + public Key getParent() throws IOException { + + return Registry.getKey(this.parent); + } + + /** + * @return all values of this key + * @since 1.0.0 + */ + public List getValues() { + + return Key.clone(this.values); + } + + /** + * @param name value name + * @return the value if the specified name, or {@code null} if no value was found; case insensitive + * @since 1.0.0 + */ + public Value getValueByName(String name) { + + for(Value value : values) { + + if(value.getName().toUpperCase().equals(name.toUpperCase())) { + + return value; + } + } + + return null; + } + + @Override + public String toString() { + + StringBuilder builder = new StringBuilder(); + builder.append("path=").append(this.path).append(';'); + builder.append("parent=").append(this.parent).append(';'); + builder.append("name=").append(this.name).append(';'); + builder.append("defaultValue=").append(this.defaultValue).append(';'); + builder.append("values=["); + boolean first = true; + + for(Value value : this.values) { + + if(first) { + + first = false; + + } else { + + builder.append(','); + } + + builder.append(value.toString()); + } + + builder.append("];childs=["); + first = true; + + for(String child : this.childs) { + + if(first) { + + first = false; + + } else { + + builder.append(','); + } + + builder.append(child.toString()); + } + + builder.append("]"); + return builder.toString(); + } + + private static final List clone(List list) { + + try { + + @SuppressWarnings("unchecked") + List clonedList = list.getClass().newInstance(); + + for(T element : list) { + + clonedList.add(element); + } + + return clonedList; + + } catch(Exception exception) { + + exception.printStackTrace(); + } + + return null; + } +} diff --git a/src/de/ralleytn/simple/registry/Registry.java b/src/de/ralleytn/simple/registry/Registry.java new file mode 100644 index 0000000..b07028f --- /dev/null +++ b/src/de/ralleytn/simple/registry/Registry.java @@ -0,0 +1,201 @@ +/* + * MIT License + * + * Copyright (c) 2017 Ralph Niemitz + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package de.ralleytn.simple.registry; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; + +/** + * Provides access to the Windows registry file. + * @author Ralph Niemitz/RalleYTN(ralph.niemitz@gmx.de) + * @version 1.0.0 + * @since 1.0.0 + */ +public final class Registry { + + /** @since 1.0.0 */ public static final String HKEY_CLASSES_ROOT = "HKEY_CLASSES_ROOT"; + /** @since 1.0.0 */ public static final String HKEY_CURRENT_USER = "HKEY_CURRENT_USER"; + /** @since 1.0.0 */ public static final String HKEY_LOCAL_MASHINE = "HKEY_LOCAL_MASHINE"; + /** @since 1.0.0 */ public static final String HKEY_USERS = "HKEY_USERS"; + /** @since 1.0.0 */ public static final String HKEY_CURRENT_CONFIG = "HKEY_CURRENT_CONFIG"; + /** @since 1.0.0 */ public static final String HKEY_DYN_DATA = "HKEY_DYN_DATA"; + + private Registry() {} + + /** + * Deletes a key. It will be deleted without asking! + * @param path path of the key + * @throws IOException if an error occurs + * @since 1.0.0 + */ + public static final void deleteKey(String path) throws IOException { + + Registry.exec("reg delete \"" + path + "\" /f"); + } + + /** + * Adds or replaces a key. Keys will be replaced without asking first! + * @param path path of the key + * @throws IOException if an error occurs + * @since 1.0.0 + */ + public static final void setKey(String path) throws IOException { + + Registry.exec("reg add \"" + path + "\" /f"); + } + + /** + * @param path path of the key + * @return key with the specified path + * @throws IOException if an error occurs + * @since 1.0.0 + */ + public static final Key getKey(String path) throws IOException { + + path = path.replace('/', '\\'); + + if(path.endsWith("\\")) { + + path = path.substring(0, path.length() - 1); + } + + String name = null; + String parent = null; + + if(path.contains("\\")) { + + String[] parts = path.split("\\\\"); + name = parts[parts.length - 1]; + + StringBuilder parentPathBuilder = new StringBuilder(); + boolean first = true; + + for(int index = 0; index < parts.length - 1; index++) { + + if(first) { + + first = false; + + } else { + + parentPathBuilder.append('\\'); + } + + parentPathBuilder.append(parts[index]); + parent = parentPathBuilder.toString(); + } + + } else { + + name = path; + } + + String result = Registry.exec("reg query \"" + path + "\""); + + if(result != null) { + + List childs = new ArrayList<>(); + List values = new ArrayList<>(); + Value defaultValue = null; + + for(String line : result.split("\n")) { + + if(line.startsWith(" >")) { + + String[] valueAttribs = line.substring(2).split("\\|"); + + values.add(new Value(valueAttribs[0], Value.Type.getTypeByName(valueAttribs[1]), valueAttribs.length == 2 ? null : valueAttribs[2])); + + } else if(!line.equals(path)){ + + childs.add(line); + } + } + + result = Registry.exec("reg query \"" + path + "\" /ve"); + + for(String line : result.split("\n")) { + + if(line.startsWith(" >")) { + + String[] valueAttribs = line.substring(2).split("\\|"); + defaultValue = new Value(valueAttribs[0], Value.Type.getTypeByName(valueAttribs[1]), valueAttribs.length == 2 ? null : valueAttribs[2]); + } + } + + return new Key(path, name, values, defaultValue, parent, childs); + } + + return null; + } + + static final String exec(String cmd) throws IOException { + + Process process = Runtime.getRuntime().exec("cmd /c " + cmd); + StringBuilder builder = new StringBuilder(); + boolean first = true; + + try(BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream(), StandardCharsets.UTF_8))) { + + String line = null; + + while((line = reader.readLine()) != null) { + + if(!line.trim().isEmpty()) { + + if(first) { + + first = false; + + } else { + + builder.append('\n'); + } + + if(line.startsWith(" ")) { + + line = " >" + line.substring(4).replace(" ", "|"); + } + + builder.append(line); + } + } + } + + if(process.exitValue() == 1) { + + try(BufferedReader reader = new BufferedReader(new InputStreamReader(process.getErrorStream(), StandardCharsets.UTF_8))) { + + throw new IOException(reader.readLine()); + } + } + + return builder.toString(); + } +} diff --git a/src/de/ralleytn/simple/registry/Value.java b/src/de/ralleytn/simple/registry/Value.java new file mode 100644 index 0000000..2d6fdd9 --- /dev/null +++ b/src/de/ralleytn/simple/registry/Value.java @@ -0,0 +1,281 @@ +/* + * MIT License + * + * Copyright (c) 2017 Ralph Niemitz + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package de.ralleytn.simple.registry; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.regex.Pattern; + +/** + * Represents a value of a registry key. + * @author Ralph Niemitz/RalleYTN(ralph.niemitz@gmx.de) + * @version 1.0.0 + * @since 1.0.0 + */ +public final class Value { + + private final String name; + private final Type type; + private final String rawValue; + private final Object value; + + Value(String name, Type type, String rawValue) { + + this.name = name; + this.type = type; + this.rawValue = rawValue; + this.value = type.parseValue(rawValue); + } + + /** + * @return value name + * @since 1.0.0 + */ + public final String getName() { + + return this.name; + } + + /** + * @return data type of value + * @since 1.0.0 + */ + public final Type getType() { + + return this.type; + } + + /** + * @return raw value data + * @since 1.0.0 + */ + public final String getRawValue() { + + return this.rawValue; + } + + /** + *
    + *
  • REG_BINARY = byte[]
  • + *
  • REG_DWORD = int
  • + *
  • REG_QWORD = long
  • + *
  • REG_SZ = String
  • + *
  • REG_EXPAND_SZ = String
  • + *
  • REG_MULTI_SZ = List<String>
  • + *
  • REG_FULL_RESOURCE_DESCRIPTOR = String
  • + *
  • REG_NONE = String
  • + *
+ * @return value data + * @since 1.0.0 + */ + public final Object getValue() { + + return this.value; + } + + @Override + public String toString() { + + StringBuilder builder = new StringBuilder(); + builder.append(this.name); + builder.append('|'); + builder.append(this.type.name()); + builder.append('|'); + builder.append(this.rawValue); + + return builder.toString(); + } + + /** + * Represents the data type of a value in a registry key. + * @author Ralph Niemitz/RalleYTN(ralph.niemitz@gmx.de) + * @version 1.0.0 + * @since 1.0.0 + */ + public static enum Type { + + /** + * byte[] + * @since 1.0.0 + */ + REG_BINARY { + + @Override + protected Object parseValue(String toParse) { + + byte[] value = null; + + try(ByteArrayOutputStream buffer = new ByteArrayOutputStream()) { + + for(int index = 0; index < toParse.length(); index += 2) { + + buffer.write(Integer.parseInt(toParse.substring(index, index + 2), 16)); + } + + value = buffer.toByteArray(); + + } catch(IOException exception) { + + exception.printStackTrace(); + } + + return value; + } + }, + + /** + * int + * @since 1.0.0 + */ + REG_DWORD { + + @Override + protected Object parseValue(String toParse) { + + return Integer.parseInt(toParse.substring(2), 16); + } + }, + + /** + * long + * @since 1.0.0 + */ + REG_QWORD { + + @Override + protected Object parseValue(String toParse) { + + return Long.parseLong(toParse.substring(2), 16); + } + }, + + /** + * String + * @since 1.0.0 + */ + REG_SZ { + + @Override + protected Object parseValue(String toParse) { + + return toParse; + } + }, + + /** + * String + * @since 1.0.0 + */ + REG_EXPAND_SZ { + + @Override + protected Object parseValue(String toParse) { + + String value = toParse; + + for(Map.Entry entry : System.getenv().entrySet()) { + + value = Pattern.compile('%' + entry.getKey() + '%', Pattern.CASE_INSENSITIVE).matcher(value).replaceAll(entry.getValue().replace("\\", "\\\\")); + } + + return value; + } + }, + + /** + * List<String> + * @since 1.0.0 + */ + REG_MULTI_SZ { + + @Override + protected Object parseValue(String toParse) { + + List value = new ArrayList<>(); + + for(String string : toParse.split("\0")) { + + if(string.isEmpty()) { + + break; + } + + value.add(string); + } + + return value; + } + }, + + /** + * String + * @since 1.0.0 + */ + REG_FULL_RESOURCE_DESCRIPTOR { + + @Override + protected Object parseValue(String toParse) { + + return toParse; + } + }, + + /** + * String + * @since 1.0.0 + */ + REG_NONE { + + @Override + protected Object parseValue(String toParse) { + + return toParse; + } + }; + + protected abstract Object parseValue(String toParse); + + /** + * @param name data type name + * @return the data type with the specified name, or {@code null} if no such data type exists + * @since 1.0.0 + */ + public static final Type getTypeByName(String name) { + + for(Type type : Type.values()) { + + if(type.name().equals(name)) { + + return type; + } + } + + return null; + } + } +}