ritopt API Documentation
by Damian Eads

gnu.dtools.ritopt
Interface OptionRegistrar

All Known Implementing Classes:
OptionModule, Options

public interface OptionRegistrar

Implementors are capable of registering options and storing them in a repository. A parent object may pass its child a reference to an OptionRegistrar to preserve abstraction and restrict access to registration. This may be preferred so that children may only register their options without performing any administrating the repository.

The Options and OptionModule classes implement this interface. It is not necessary to refer to instances as an OptionRegistrar.


 Copyright (C) Damian Ryan Eads, 2001. All Rights Reserved.

 ritopt is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 ritopt is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with ritopt; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 

Author:
Damian Eads

Method Summary
 void register(char shortName, Option option)
          Register an option into the repository as a short option.
 void register(java.lang.String longOption, char shortOption, Option option)
          Register an option into the repository both as a short and long option.
 void register(java.lang.String longOption, char shortOption, java.lang.String description, Option option)
          Register an option into the repository both as a short and long option.
 void register(java.lang.String longOption, char shortOption, java.lang.String description, Option option, boolean deprecated)
          Register an option into the repository both as a short and long option.
 void register(java.lang.String longName, Option option)
          Register an option into the repository as a long option.
 

Method Detail

register

public void register(java.lang.String longName,
                     Option option)
Register an option into the repository as a long option.
Parameters:
longName - The long option name.
option - The option to register.

register

public void register(char shortName,
                     Option option)
Register an option into the repository as a short option.
Parameters:
shortName - The short option name.
option - The option to register.

register

public void register(java.lang.String longOption,
                     char shortOption,
                     Option option)
Register an option into the repository both as a short and long option.
Parameters:
longOption - The long option name.
shortOption - The short option name.
option - The option to register.

register

public void register(java.lang.String longOption,
                     char shortOption,
                     java.lang.String description,
                     Option option)
Register an option into the repository both as a short and long option. Initialize its description with the description passed.
Parameters:
longOption - The long option name.
shortOption - The short option name.
description - The description of the option.
option - The option to register.

register

public void register(java.lang.String longOption,
                     char shortOption,
                     java.lang.String description,
                     Option option,
                     boolean deprecated)
Register an option into the repository both as a short and long option. Initialize its description with the description passed.
Parameters:
longOption - The long option name.
shortOption - The short option name.
description - The description of the option.
option - The option to register.
deprecated - A boolean indicating whether an option should be deprecated.

Copyright (C) Damian Ryan Eads, 2001. All Rights Reserved.
SourceForge Logo