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