@InterfaceAudience.Private public class ChecksumFactory extends Object
Modifier and Type | Field and Description |
---|---|
private static Class<?>[] |
EMPTY_ARRAY |
Constructor and Description |
---|
ChecksumFactory() |
Modifier and Type | Method and Description |
---|---|
private static Class<?> |
getClassByName(String name)
Load a class by name.
|
static Constructor<?> |
newConstructor(String className)
Returns a Constructor that can be used to create a Checksum object.
|
private static <T> T |
newInstance(Class<T> theClass)
Create an object for the given class and initialize it from conf
|
static Checksum |
newInstance(String className)
Create a new instance of a Checksum object.
|
private static final Class<?>[] EMPTY_ARRAY
public static Checksum newInstance(String className) throws IOException
IOException
public static Constructor<?> newConstructor(String className) throws IOException
className
- classname for which an constructor is createdIOException
private static <T> T newInstance(Class<T> theClass)
theClass
- class of which an object is createdprivate static Class<?> getClassByName(String name) throws ClassNotFoundException
name
- the class name.ClassNotFoundException
- if the class is not found.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.