public final class CommandLineUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Class<? extends Directory> |
loadDirectoryClass(java.lang.String clazzName)
Loads a specific Directory implementation
|
static java.lang.Class<? extends FSDirectory> |
loadFSDirectoryClass(java.lang.String clazzName)
Loads a specific FSDirectory implementation
|
static FSDirectory |
newFSDirectory(java.lang.Class<? extends FSDirectory> clazz,
java.io.File file)
Creates a new specific FSDirectory instance
|
static FSDirectory |
newFSDirectory(java.lang.String clazzName,
java.io.File file)
Creates a specific FSDirectory instance starting from its class name
|
public static FSDirectory newFSDirectory(java.lang.String clazzName, java.io.File file)
clazzName - The name of the FSDirectory class to loadfile - The file to be used as parameter constructorpublic static java.lang.Class<? extends Directory> loadDirectoryClass(java.lang.String clazzName) throws java.lang.ClassNotFoundException
clazzName - The name of the Directory class to loadjava.lang.ClassNotFoundException - If the specified class cannot be found.public static java.lang.Class<? extends FSDirectory> loadFSDirectoryClass(java.lang.String clazzName) throws java.lang.ClassNotFoundException
clazzName - The name of the FSDirectory class to loadjava.lang.ClassNotFoundException - If the specified class cannot be found.public static FSDirectory newFSDirectory(java.lang.Class<? extends FSDirectory> clazz, java.io.File file) throws java.lang.NoSuchMethodException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
clazz - The class of the object to be createdfile - The file to be used as parameter constructorjava.lang.NoSuchMethodException - If the Directory does not have a constructor that takes File.java.lang.InstantiationException - If the class is abstract or an interface.java.lang.IllegalAccessException - If the constructor does not have public visibility.java.lang.reflect.InvocationTargetException - If the constructor throws an exceptionCopyright © 2010 - 2024 Adobe. All Rights Reserved