public class Instantiator extends Object
| Constructor and Description |
|---|
Instantiator() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getInstance(String className,
Supplier<ClassLoader> classloaderSupplier,
Configuration configuration)
Instantiates the specified class either using the no-args constructor or the
constructor with a single parameter of type
Configuration, if a
configuration object is passed. |
static <T> T |
getInstanceWithProperties(String className,
Supplier<ClassLoader> classloaderSupplier,
Properties prop)
Instantiates the specified class either using the no-args constructor or the
constructor with a single parameter of type
Properties, if a
properties object is passed. |
private static <T,C> T |
getInstanceWithProvidedConstructorType(String className,
Supplier<ClassLoader> classloaderSupplier,
Class<C> constructorType,
C constructorValue) |
public static <T> T getInstance(String className, Supplier<ClassLoader> classloaderSupplier, Configuration configuration)
Configuration, if a
configuration object is passed.null if no class name was givenpublic static <T> T getInstanceWithProperties(String className, Supplier<ClassLoader> classloaderSupplier, Properties prop)
Properties, if a
properties object is passed.null if no class name was givenprivate static <T,C> T getInstanceWithProvidedConstructorType(String className, Supplier<ClassLoader> classloaderSupplier, Class<C> constructorType, C constructorValue)
Copyright © 2020 JBoss by Red Hat. All rights reserved.