org.apache.torque.generator.configuration

## Class ClassHelper

- java.lang.Object
- - org.apache.torque.generator.configuration.ClassHelper

-     public final class ClassHelper
      extends Object

  Helper for instantiating classes. $Id: ClassHelper.java 1850967 2019-01-10 17:54:13Z painter $

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Object` | `getInstance(String className, Class<?> isInstanceOf, UnitDescriptor unitDescriptor)` Creates an instance of a class and checks whether it can be casted to another class

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

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

- - ### Method Detail

    - #### getInstance

          public static Object getInstance(String className,
                                           Class<?> isInstanceOf,
                                           UnitDescriptor unitDescriptor)
                                    throws ConfigurationException

      Creates an instance of a class and checks whether it can be casted to another class
      Parameters:
        `className` - the fully qualified name of the class to instantiate.
        `isInstanceOf` - the Interface or class the instance must be an instance of, or null to disable the check.
        `unitDescriptor` - The description of the generation unit, not null.
      Returns:
        the instance of the class
      Throws:
        `ConfigurationException` - if the class cannot be instantiated or it is not an instance of `isInstanceOf`

Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.