Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class CommandLineUtil

    Class containing some useful methods used by command line tools

    Inheritance
    object
    CommandLineUtil
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public static class CommandLineUtil

    Methods

    LoadDirectoryClass(string)

    Loads a specific Directory implementation.

    Declaration
    public static Type LoadDirectoryClass(string clazzName)
    Parameters
    Type Name Description
    string clazzName

    The name of the Directory class to load.

    Returns
    Type Description
    Type

    The Directory class loaded.

    Exceptions
    Type Condition
    TypeLoadException

    If the specified class cannot be found.

    LoadFSDirectoryClass(string)

    Loads a specific FSDirectory implementation.

    Declaration
    public static Type LoadFSDirectoryClass(string clazzName)
    Parameters
    Type Name Description
    string clazzName

    The name of the FSDirectory class to load.

    Returns
    Type Description
    Type

    The FSDirectory class loaded.

    Exceptions
    Type Condition
    TypeLoadException

    If the specified class cannot be found.

    NewFSDirectory(string, DirectoryInfo)

    Creates a specific FSDirectory instance starting from its class name.

    Declaration
    public static FSDirectory NewFSDirectory(string clazzName, DirectoryInfo dir)
    Parameters
    Type Name Description
    string clazzName

    The name of the FSDirectory class to load.

    DirectoryInfo dir

    The DirectoryInfo to be used as parameter constructor.

    Returns
    Type Description
    FSDirectory

    The new FSDirectory instance

    NewFSDirectory(Type, DirectoryInfo)

    Creates a new specific FSDirectory instance.

    Declaration
    public static FSDirectory NewFSDirectory(Type clazz, DirectoryInfo dir)
    Parameters
    Type Name Description
    Type clazz

    The class of the object to be created

    DirectoryInfo dir

    The DirectoryInfo to be used as parameter constructor

    Returns
    Type Description
    FSDirectory

    The new FSDirectory instance.

    Exceptions
    Type Condition
    MissingMethodException

    If the Directory does not have a constructor that takes DirectoryInfo.

    MemberAccessException

    If the class is abstract or an interface.

    TypeLoadException

    If the constructor does not have public visibility.

    TargetInvocationException

    If the constructor throws an exception

    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.