CommandLineUtil (Lucene 3.6.2 API)
Keywords: org.apache.lucene.util.CommandLineUtil class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.util
Class CommandLineUtil

    java.lang.Object
      org.apache.lucene.util.CommandLineUtil

    public final class CommandLineUtil

extends Object

Class containing some useful methods used by command line tools

Method Summary
`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

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### newFSDirectory

    public static FSDirectory newFSDirectory(String clazzName,
                                             File file)

  Creates a specific FSDirectory instance starting from its class name

  Parameters:
    `clazzName` - The name of the FSDirectory class to load
    `file` - The file to be used as parameter constructor
  Returns:
    the new FSDirectory instance

### loadDirectoryClass

    public static Class<? extends Directory> loadDirectoryClass(String clazzName)
                                                         throws ClassNotFoundException

  Loads a specific Directory implementation

  Parameters:
    `clazzName` - The name of the Directory class to load
  Returns:
    The Directory class loaded
  Throws:
    `ClassNotFoundException`

### loadFSDirectoryClass

    public static Class<? extends FSDirectory> loadFSDirectoryClass(String clazzName)
                                                             throws ClassNotFoundException

  Loads a specific FSDirectory implementation

  Parameters:
    `clazzName` - The name of the FSDirectory class to load
  Returns:
    The FSDirectory class loaded
  Throws:
    `ClassNotFoundException`

### newFSDirectory

    public static FSDirectory newFSDirectory(Class<? extends FSDirectory> clazz,
                                             File file)
                                      throws NoSuchMethodException,
                                             InstantiationException,
                                             IllegalAccessException,
                                             InvocationTargetException

  Creates a new specific FSDirectory instance

  Parameters:
    `clazz` - The class of the object to be created
    `file` - The file to be used as parameter constructor
  Returns:
    The new FSDirectory instance
  Throws:
    `NoSuchMethodException`
    `InstantiationException`
    `IllegalAccessException`
    `InvocationTargetException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD