TypeHelper (Groovy 5.0.8)

Package: org.codehaus.groovy.vmplugin.v8

## [Java] Class TypeHelper

- org.codehaus.groovy.vmplugin.v8.TypeHelper

-     public class TypeHelper
      extends Object

  This class contains helper methods for converting and comparing types. WARNING: This class is for internal use only. Do not use it outside of its package and not outside of groovy-core.

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected static boolean` | `argumentClassIsParameterClass(Class<?> argumentClass, Class<?> parameterClass)` Realizes an unsharp equal for the class.
    `` | `protected static Class<?>` | `getUnboxedType(Class<?> c)`
    `` | `protected static Class<?>` | `getWrapperClass(Class<?> c)` Gets wrapper class for a given class.
    `` | `protected static boolean` | `isBigDecCategory(Class<?> x)`
    `` | `protected static boolean` | `isDoubleCategory(Class<?> x)`
    `` | `protected static boolean` | `isIntCategory(Class<?> x)`
    `` | `protected static boolean` | `isLongCategory(Class<?> x)`
    `` | `protected static MethodType` | `replaceWithMoreSpecificType(Object[] args, MethodType callSiteType)` Replaces the types in the callSiteType parameter if more specific types given through the arguments.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### protected static boolean argumentClassIsParameterClass(Class<?> argumentClass, Class<?> parameterClass)

      Realizes an unsharp equal for the class. In general we return true if the provided arguments are the same. But we will also return true if our argument class is a wrapper for the parameter class. For example the parameter is an int and the argument class is a wrapper.

    - #### protected static Class<?> getUnboxedType(Class<?> c)

    - #### protected static Class<?> getWrapperClass(Class<?> c)

      Gets wrapper class for a given class. If the class is for a primitive number type, then the wrapper class will be returned. If it is not a primitive number type, we return the class itself.

    - #### protected static boolean isBigDecCategory(Class<?> x)

    - #### protected static boolean isDoubleCategory(Class<?> x)

    - #### protected static boolean isIntCategory(Class<?> x)

    - #### protected static boolean isLongCategory(Class<?> x)

    - #### protected static MethodType replaceWithMoreSpecificType(Object[] args, MethodType callSiteType)

      Replaces the types in the callSiteType parameter if more specific types given through the arguments. This is in general the case, unless the argument is null.