Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.dtools.ritopt.* (30)

Package Samples:

gnu.dtools.ritopt

Classes:

Option: This is the principal base class for all Option classes. It contains constructors for short and long option initialization, utility members for help reporting and file writing, and deprecation facilities. Options that provide array support should inherit from the ArrayOption class, and follow the guidelines defined both in the Option and ArrayOption class descriptions. Non-abstract subclasses should implement the modify method. When an option is invoked, the value of the option is passed to the modify method. Subclasses should provide several constructors so that registration is simple and uniform. ...
NotifyOption: The NotifyOption class is used to register options that when invoked notify a listener. This provides an interface for event-driven options processing. In order for a class to be notified, it must implement the OptionListener interface. When the option is invoked, the corresponding short, long, and option values are put in an OptionEvent object, and passed to all registered listeners. A class must implement the OptionListener interface in order to receive notification of option events. For a more detailed explanation please refer to the tutorial. The following is a simple example of how a NotifyOption ...
OptionMenu: This class facilitates the built-in menu feature for ritopt. When the --menu long option is invoked, an instance of this class is notified, and the menu system starts. Here is an example run of the built-in menu. -> ? - Options Delimiter ? Help = Run program and return to menu ! Shell to Operating System $ Exit menu + Additional options @<filename> Get options from file [default.opt] @@ Get options from file [default.opt] %<filename> Put options in file %% Put options in file [default.opt] . Quit -> =ls -> =uname CYGWIN_ME-4.90 Exit status: 0 Press enter to continue... ...
SimpleProcess: A SimpleProcess is used to execute a shell process, and redirect an input stream to the processes' standard input, as well as redirect the processes' standard output/error to an output stream. The processes is multithreaded to prevent deadlock. The example below demonstrates the use of this class. class ExecuteProcess { public static void main( String args[] ) { if ( args.length > 0 ) { String processName = args[ 0 ]; try { SimpleProcess process = new SimpleProcess( Runtime.getRuntime.exec( processName ) ); ); int exitStatus = process.waitFor(); System.out.println( "The process ran successfully" ...
Options: This class functions as a repository for options and their modules. It facilitates registration of options and modules, as well as processing of arguments. Information such as help, usage, and versions are displayed when the respective --help and --version options are specified. The --menu option will invoke the built-in menu. In the example below, the program processes three simple options. public class AboutMe { private static StringOption name = new StringOption( "Ryan" ); private static IntOption age = new IntOption( 19 ); private static DoubleOption bankBalance = new DoubleOption( 15.15 ); ...
BooleanOption: This class is used for options with boolean values. There are several ways to invoke a boolean option at the command line. For example, a plus (true) or minus (false) sign directly after the short or long option may be used. myprogram -a+ -b- --longa+ --longb- The following keywords may be used to invoke an option using the assignment form. + - true false yes no on off activated not activated active inactive To invoke an option using assignment form where is the of the option, use the following syntax. myprogram -a= -b --longa= --longb= Invoking a boolean option without using any of the aforementioned ...
OptionModule: This class is used as a repository for options. The Options class maintains an OptionModule repository for general options. The user may create option modules so that their options can overlap and be categorized. Option modules are invoked by specifying the option name delimited with square brackets. For example, suppose we are writing a program called ServerManager that manages both an ftp and http server. One option that both a ftp and http kernel might have in common is the number of seconds before a request times out. Option modules are used to process two different values with the same option ...
OptionArrayable: If an option supports array registration and processing then it should implement this interface. For example, let's say we are implementing an integer array option class. public class MyIntArray extends ArrayOption implements OptionArrayable, OptionModifiable { int values[]; // rest of implementation goes here. public void modify(java.lang.String[] value) { try { int newValues[] = new int[ value.length ]; for int( n = 0; n 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 ...
ArrayOption: The principal base class used to register option variables that represent arrays or Collections. Array options are useful for options which represent path lists or file specifications. The preferred derived sub-class implementation is to provide a constructor with a single array parameter to allow for simple registration. For example, an ArrayOption derived class for int arrays should implement the following constructor and accessor. MyIntArrayOption( int array[] ); int[] getValue(); Although this has no affect on option processing, following this philosophy for the public interfaces make it easier ...
OptionModuleRegistrar: Implementors are capable of registering option modules and storing them in a repository. A parent object may pass its child a reference to an OptionModuleRegistrar to preserve abstraction and constrain access to registration. This may be preferred so that children may only register their OptionModules without performing any administrating the repository. The Options class implements this interface. It is not necessary to refer to instances as an OptionModuleRegistrar. Copyright (C) Damian Ryan Eads, 2001. All Rights Reserved. ritopt is free software; you can redistribute it and/or modify it under ...
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 ...
StreamPrinter: Reads data from an input stream and outputs to a print stream. This class is used by the OptionMenu class to read from both standard output and standard error simultaneously when a shell command is executed. Since the StreamPrinter processes streams on a separate thread, deadlock is prevented. 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 ...
OptionEvent: An event indicating that an option has been invoked. When an OptionListener is notified by a NotifyOption, it passes an OptionEvent object to all registered listeners. This includes the target NotifyOption, a command (NotifyOption passes the long option by default), and the option value. 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 ...
OptionListener: This interface is used to receive notification of option processing events. Implementors are registered by being passed to an OptionNotifier's addOptionListener method. Option processing events occur when an option is invoked at the command line, menu, or is present in an options file. 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 ...
OptionException: An OptionException is thrown when an error occurs during option processing, modification, or registration. This class is the base class for all run-time based option processing exceptions. A class must throw an instance of one of the derived classes as this implementation is abstract. 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 ...
OptionNotifier: If an object is able notify and maintain a repository of listeners, it should implement this interface even though it is not required. This interface expects listener registration and event configuration behavior. 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 ...
Stoppable: Implementors are capable of being stopped. This interface is used by the StreamPrinters in the SimpleProcess class so that it if an error has occurred. 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 ...
OptionModifiable: Implementors of this interface are capable of being registered and processed. When an option is specified, its modify method is invoked. 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. ...
OptionRegistrationException: This exception indicates that an error has occurred during registration of an option, registrar, or module. 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 ...
OptionModificationException: Instances of this class are thrown if there is an error during modification of an option's value. 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 ...
OptionProcessingException: Instances of this exception are thrown when an error occurs when processing the command line. 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 ...
Utility: This class provides static utility members for some basic string operations. 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 ...
CharOption: This class is used for options with character values. 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 ...
IntOption: This class is used for options with integer values. 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 ...
DoubleOption: This class is used for options with double values. 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 ...

Home | Contact Us | Privacy Policy | Terms of Service