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 - If the specified class cannot be found.public static Class<? extends FSDirectory> loadFSDirectoryClass(String clazzName) throws ClassNotFoundException
clazzName - The name of the FSDirectory class to loadClassNotFoundException - If the specified class cannot be found.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 - If the Directory does not have a constructor that takes File.InstantiationException - If the class is abstract or an interface.IllegalAccessException - If the constructor does not have public visibility.InvocationTargetException - If the constructor throws an exceptionCopyright © 2000-2012 Apache Software Foundation. All Rights Reserved.