public final class ClassHelper extends Object
| 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
|
public static Object getInstance(String className, Class<?> isInstanceOf, UnitDescriptor unitDescriptor) throws ConfigurationException
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.ConfigurationException - if the class cannot be instantiated
or it is not an instance of isInstanceOfCopyright © 2000–2020 The Apache Software Foundation. All rights reserved.