public final class CommandLineUtil extends Object
Modifier and Type | Method and Description |
---|---|
static Class<? extends Directory> |
loadDirectoryClass(String clazzName)
Loads a specific Directory implementation
|
static Class<? extends FSDirectory> |
loadFSDirectoryClass(String clazzName)
Loads a specific FSDirectory implementation
|
static FSDirectory |
newFSDirectory(Class<? extends FSDirectory> clazz,
File file)
Creates a new specific FSDirectory instance
|
static FSDirectory |
newFSDirectory(String clazzName,
File file)
Creates a specific FSDirectory instance starting from its class name
|
public static FSDirectory newFSDirectory(String clazzName, File file)
clazzName
- The name of the FSDirectory class to loadfile
- The file to be used as parameter constructorpublic static Class<? extends Directory> loadDirectoryClass(String clazzName) throws ClassNotFoundException
clazzName
- The name of the Directory class to loadClassNotFoundException
public static Class<? extends FSDirectory> loadFSDirectoryClass(String clazzName) throws ClassNotFoundException
clazzName
- The name of the FSDirectory class to loadClassNotFoundException
public static FSDirectory newFSDirectory(Class<? extends FSDirectory> clazz, File file) throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException
clazz
- The class of the object to be createdfile
- The file to be used as parameter constructorNoSuchMethodException
InstantiationException
IllegalAccessException
InvocationTargetException