public class Utils extends Object
Modifier and Type | Method and Description |
---|---|
static ClassLoader |
getContextOrCruiseControlClassLoader()
Get the Context ClassLoader on this thread or, if not present, the ClassLoader that
loaded Kafka.
|
static ClassLoader |
getCruiseControlClassLoader()
Get the ClassLoader which loaded Kafka.
|
static <T> String |
join(Collection<T> list,
String separator)
Create a string representation of a list joined by the given separator
|
static <T> T |
newInstance(Class<T> c)
Instantiate the class
|
static <T> T |
newInstance(String klass,
Class<T> base)
Look up the class by name and instantiate it.
|
public static <T> T newInstance(Class<T> c) throws CruiseControlException
CruiseControlException
public static <T> T newInstance(String klass, Class<T> base) throws ClassNotFoundException, CruiseControlException
T
- klass
- class namebase
- super class of the class to be instantiatedClassNotFoundException
CruiseControlException
public static ClassLoader getContextOrCruiseControlClassLoader()
public static ClassLoader getCruiseControlClassLoader()
public static <T> String join(Collection<T> list, String separator)
list
- The list of itemsseparator
- The separator