TypeUtil (py4j-java 0.10.9.4 API)
Date: 2022-03-16

py4j.reflection

## Class TypeUtil

- java.lang.Object
- - py4j.reflection.TypeUtil

-     public class TypeUtil
      extends java.lang.Object

  This class is responsible for the type conversion between Python types and Java types.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DISTANCE_FACTOR`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TypeUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `computeCharacterConversion(java.lang.Class<?> parent, java.lang.Class<?> child, java.util.List<TypeConverter> converters)`
    `static int` | `computeDistance(java.lang.Class<?> parent, java.lang.Class<?> child)`
    `static int` | `computeNumericConversion(java.lang.Class<?> parent, java.lang.Class<?> child, java.util.List<TypeConverter> converters)`
    `static java.lang.Class<?>` | `forName(java.lang.String fqn)`
    `static java.lang.Class<?>` | `forName(java.lang.String fqn, JVMView view)`
    `static java.lang.Class<?>` | `getClass(java.lang.String simpleName, JVMView view)`
    `static int` | `getCost(java.lang.Class<?> parent, java.lang.Class<?> child)`
    `static java.lang.String` | `getName(java.lang.String name, boolean shortName)`
    `static java.util.List<java.lang.String>` | `getNames(java.lang.Class<?>[] classes)`
    `static java.lang.String` | `getPackage(java.lang.String name)`
    `static int` | `getPoint(java.lang.Class<?> clazz)`
    `static boolean` | `isBoolean(java.lang.Class<?> clazz)`
    `static boolean` | `isByte(java.lang.Class<?> clazz)`
    `static boolean` | `isCharacter(java.lang.Class<?> clazz)`
    `static boolean` | `isDouble(java.lang.Class<?> clazz)`
    `static boolean` | `isFloat(java.lang.Class<?> clazz)`
    `static boolean` | `isInstanceOf(java.lang.Class<?> clazz, java.lang.Object object)` Checks if an object is an instance of a given class.
    `static boolean` | `isInstanceOf(java.lang.String classFQN, java.lang.Object object)` Checks if an object is an instance of a given class.
    `static boolean` | `isInteger(java.lang.Class<?> clazz)`
    `static boolean` | `isLong(java.lang.Class<?> clazz)`
    `static boolean` | `isNumeric(java.lang.Class<?> clazz)`
    `static boolean` | `isShort(java.lang.Class<?> clazz)`

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

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

- - ### Field Detail

    - #### DISTANCE_FACTOR

          public static final int DISTANCE_FACTOR

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TypeUtil

          public TypeUtil()

  - ### Method Detail

    - #### computeCharacterConversion

          public static int computeCharacterConversion(java.lang.Class<?> parent,
                                                       java.lang.Class<?> child,
                                                       java.util.List<TypeConverter> converters)

    - #### computeDistance

          public static int computeDistance(java.lang.Class<?> parent,
                                            java.lang.Class<?> child)

    - #### computeNumericConversion

          public static int computeNumericConversion(java.lang.Class<?> parent,
                                                     java.lang.Class<?> child,
                                                     java.util.List<TypeConverter> converters)

    - #### forName

          public static java.lang.Class<?> forName(java.lang.String fqn)
                                            throws java.lang.ClassNotFoundException

      Throws:
        `java.lang.ClassNotFoundException`

    - #### forName

          public static java.lang.Class<?> forName(java.lang.String fqn,
                                                   JVMView view)
                                            throws java.lang.ClassNotFoundException

      Throws:
        `java.lang.ClassNotFoundException`

    - #### getClass

          public static java.lang.Class<?> getClass(java.lang.String simpleName,
                                                    JVMView view)
                                             throws java.lang.ClassNotFoundException

      Throws:
        `java.lang.ClassNotFoundException`

    - #### getCost

          public static int getCost(java.lang.Class<?> parent,
                                    java.lang.Class<?> child)

    - #### getName

          public static java.lang.String getName(java.lang.String name,
                                                 boolean shortName)

    - #### getNames

          public static java.util.List<java.lang.String> getNames(java.lang.Class<?>[] classes)

    - #### getPackage

          public static java.lang.String getPackage(java.lang.String name)

    - #### getPoint

          public static int getPoint(java.lang.Class<?> clazz)

    - #### isBoolean

          public static boolean isBoolean(java.lang.Class<?> clazz)

    - #### isByte

          public static boolean isByte(java.lang.Class<?> clazz)

    - #### isCharacter

          public static boolean isCharacter(java.lang.Class<?> clazz)

    - #### isDouble

          public static boolean isDouble(java.lang.Class<?> clazz)

    - #### isFloat

          public static boolean isFloat(java.lang.Class<?> clazz)

    - #### isInteger

          public static boolean isInteger(java.lang.Class<?> clazz)

    - #### isLong

          public static boolean isLong(java.lang.Class<?> clazz)

    - #### isNumeric

          public static boolean isNumeric(java.lang.Class<?> clazz)

    - #### isShort

          public static boolean isShort(java.lang.Class<?> clazz)

    - #### isInstanceOf

          public static boolean isInstanceOf(java.lang.Class<?> clazz,
                                             java.lang.Object object)

      Checks if an object is an instance of a given class.

      Parameters:
        `clazz` - The class to check
        `object` - The object
      Returns:
        True if object is an instance of clazz.

    - #### isInstanceOf

          public static boolean isInstanceOf(java.lang.String classFQN,
                                             java.lang.Object object)

      Checks if an object is an instance of a given class.

      Parameters:
        `classFQN` - The fully qualified name of a class to check
        `object` - The object
      Returns:
        True if object is an instance of the class.