org.oorexx.clr

## Class Helper4ooRexx4Net

- java.lang.Object
- - org.oorexx.clr.Helper4ooRexx4Net

-     public class Helper4ooRexx4Net
      extends java.lang.Object

  This class helps the ooRexx dynamic language coders to box and unbox numeric values into the common language runtime (CLR) wrapper classes. This class can be used for any other such dynamic language that uses strings to represent numeric values.
  Since:
    2016-06-13
  Version:
    001.201600613
  Author:
    Rony G. Flatscher

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static system.IFormatProvider` | `ifpCultureNeutral` Culture neutral `IFormatProvider` for allowing to parse and create Rexx decimal numbers using the point (dot) character for the decimal point.
    `static java.lang.String` | `version` Version field, major version before dot, date of version after dot.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Helper4ooRexx4Net()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static system.Object` | `clr_box(java.lang.String typeIndicator, java.lang.String value)` Create and return an instance of the `typeIndicator` Wrapper class representing the `value` or turn a `java.lang.String` into a `System.String` and return it.
    `static java.lang.Object` | `clr_unbox(system.Object o)` Utility method for "oorexx.net" to turn values of `clr` primitive types and or System.String values to plain strings, otherwise returns argument unchanged.
    `static java.util.Map` | `getCultureNeutralParseMethods()` Returns an unmodifiable `Map` of `miCultureNeutralParseMethods` to allow inspection and usage.
    `static java.util.Map` | `getCultureNeutralToStringMethods()` Returns an unmodifiable `Map` of `miCultureNeutralToStringMethods` to allow inspection and usage.
    `static java.lang.String` | `getFieldName(system.Type t, java.lang.String argName)` Searches a field in the supplied type which matches caselessly the supplied needle and returns the spelling found in the `FieldInfo` object.
    `static java.lang.String` | `getMethodName(system.Type t, java.lang.String argName)` Searches a method in the supplied type which matches caselessly the supplied needle and returns the spelling found in the `MethodInfo` object.
    `static java.util.Map` | `getPrimitiveWrapperClasses()` Returns an unmodifiable `Map` of `tiPrimitiveWrapperClasses` to allow inspection and usage.
    `static java.lang.String` | `getPropertyName(system.Type t, java.lang.String argName)` Searches a property in the supplied type which matches caselessly the supplied needle and returns the spelling found in the `PropertyInfo` object.
    `static boolean` | `isDebug()` Getter method for field `bDebug`.
    `static boolean` | `isVerbose()` Getter method for field `bVerbose`.
    `static void` | `main(java.lang.String[] args)` `main` method.
    `static void` | `setDebug(boolean DebugMode)` Setter method for field `bDebug`.
    `static void` | `setVerbose(boolean verboseMode)` Setter method for field `bVerbose`.

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

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

- - ### Field Detail

    - #### version

          public static final java.lang.String version

      Version field, major version before dot, date of version after dot.
      See Also:
        Constant Field Values

    - #### ifpCultureNeutral

          public static system.IFormatProvider ifpCultureNeutral

      Culture neutral `IFormatProvider` for allowing to parse and create Rexx decimal numbers using the point (dot) character for the decimal point. Affects boxing and unboxing of "System.Decimal", "System.Single" and and "System.Double".

  - ### Constructor Detail

    - #### Helper4ooRexx4Net

          public Helper4ooRexx4Net()

  - ### Method Detail

    - #### isVerbose

          public static boolean isVerbose()

      Getter method for field `bVerbose`.
      Returns:
        whether verbose mode is active

    - #### setVerbose

          public static void setVerbose(boolean verboseMode)

      Setter method for field `bVerbose`.
      Parameters:
        `verboseMode` - to use from now on

    - #### isDebug

          public static boolean isDebug()

      Getter method for field `bDebug`.
      Returns:
        whether Debug mode is active

    - #### setDebug

          public static void setDebug(boolean DebugMode)

      Setter method for field `bDebug`.
      Parameters:
        `DebugMode` - to use from now on

    - #### getPrimitiveWrapperClasses

          public static java.util.Map getPrimitiveWrapperClasses()

      Returns an unmodifiable `Map` of `tiPrimitiveWrapperClasses` to allow inspection and usage.
      Returns:
        unmodifiable `Map` of `tiPrimitiveWrapperClasses`

    - #### getCultureNeutralParseMethods

          public static java.util.Map getCultureNeutralParseMethods()

      Returns an unmodifiable `Map` of `miCultureNeutralParseMethods` to allow inspection and usage.
      Returns:
        unmodifiable `Map` of `miCultureNeutralParseMethods`

    - #### getCultureNeutralToStringMethods

          public static java.util.Map getCultureNeutralToStringMethods()

      Returns an unmodifiable `Map` of `miCultureNeutralToStringMethods` to allow inspection and usage.
      Returns:
        unmodifiable `Map` of `miCultureNeutralToStringMethods`

    - #### main

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

      `main` method.
      Parameters:
        `args` - command line arguments, not used
      Throws:
        `java.io.IOException` - raised if a problem occurs while initializing the `Bridge`.

    - #### clr_unbox

          public static java.lang.Object clr_unbox(system.Object o)

      Utility method for "oorexx.net" to turn values of `clr` primitive types and or System.String values to plain strings, otherwise returns argument unchanged.
      Parameters:
        `o` - a .net object of type `system.Object`
      Returns:
        the primitive .net value or .net string as a Java String, or the argument unchanged

    - #### clr_box

          public static system.Object clr_box(java.lang.String typeIndicator,
                                              java.lang.String value)

      Create and return an instance of the `typeIndicator` Wrapper class representing the `value` or turn a `java.lang.String` into a `System.String` and return it.
      Parameters:
        `typeIndicator` - one of (only capital letters need to be given) "STring" (return the value as string), or return a boxed `value` according to the following table:

        Values for `typeIndicator` argument and the CLR class to which to box.
        typeIndicator | returns boxed value of type
        --- | ---
        "BOolean" | "System.Boolean"
        "BYte" | "System.Byte"
        "Char" | "System.Char"
        "DEcimal" | "System.Decimal"
        "DOuble" | "System.Double"
        "I16" | "System.Int16"
        "I32" | "System.Int32"
        "I64" | "System.Int64"
        "INT16" | "System.Int16"
        "INT32" | "System.Int32"
        "INT64" | "System.Int64"
        "SByte" | "System.SByte"
        "SIngle" | "System.Single"
        "STring" | "System.String"
        "UI16" | "System.UInt16"
        "UI32" | "System.UInt32"
        "UI64" | "System.UInt64"
        "UINT16" | "System.UInt16"
        "UINT32" | "System.UInt32"
        "UINT64" | "System.UInt64"

        `value` - a string containing the value to be boxed
      Returns:
        returns boxed value, in the case of a string the value as a `system.String` object, `null` if `null` was supplied as the `value` parameter or the boxed object.

    - #### getMethodName

          public static java.lang.String getMethodName(system.Type t,
                                                       java.lang.String argName)

      Searches a method in the supplied type which matches caselessly the supplied needle and returns the spelling found in the `MethodInfo` object.
      Parameters:
        `t` - the `system.Type` object to look for the method's name
        `argName` - the name of a method we seek
      Returns:
        the properly spelled name of the method or `null` if none was found

    - #### getPropertyName

          public static java.lang.String getPropertyName(system.Type t,
                                                         java.lang.String argName)

      Searches a property in the supplied type which matches caselessly the supplied needle and returns the spelling found in the `PropertyInfo` object.
      Parameters:
        `t` - the `system.Type` object to look for the property's name
        `argName` - the name of a property we seek
      Returns:
        the properly spelled name of the property or `null` if none was found

    - #### getFieldName

          public static java.lang.String getFieldName(system.Type t,
                                                      java.lang.String argName)

      Searches a field in the supplied type which matches caselessly the supplied needle and returns the spelling found in the `FieldInfo` object.
      Parameters:
        `t` - the `system.Type` object to look for the field's name
        `argName` - the name of a field we seek
      Returns:
        the properly spelled name of the field or `null` if none was found