A C D E F G H I M N O P R S T U V W 
All Classes All Packages

A

addToCollection(Field, Object, Class<?>, Class<?>, Object) - Method in class pro.johndunlap.getopt.ParseContext
This is broken out into its own function because the annotations required for silencing the warnings cannot be used at the statement level.
Arg - Annotation Type in pro.johndunlap.getopt.annotation
This annotation is used to mark a field as a named option(code/flag).

C

camelCaseToHyphenCase(String) - Static method in enum pro.johndunlap.getopt.Parser
Convert a camel case string to hyphen case.
category() - Method in annotation type pro.johndunlap.getopt.annotation.Arg
The category in which the option should appear in the help message.
category() - Method in annotation type pro.johndunlap.getopt.annotation.GetOptOrdered
The category in which the option should appear in the help message.
closingText() - Method in annotation type pro.johndunlap.getopt.annotation.Help
The text to display after the list of options.
code() - Method in annotation type pro.johndunlap.getopt.annotation.Arg
The single character code for the option.
collectionType() - Method in annotation type pro.johndunlap.getopt.annotation.Arg
This is only necessary if the field is a collection.
collectionType() - Method in annotation type pro.johndunlap.getopt.annotation.GetOptOrdered
This is only necessary if the field is a collection.
converter() - Method in annotation type pro.johndunlap.getopt.annotation.Arg
This is only necessary if the field is a type that is not supported by default.
converter() - Method in annotation type pro.johndunlap.getopt.annotation.GetOptOrdered
The parser to use for this option.

D

DEFAULT_ERROR_EXIT_STATUS - Static variable in exception pro.johndunlap.getopt.exception.ParseException
 
DefaultValueParser - Class in pro.johndunlap.getopt
A default implementation of the ValueParser interface.
DefaultValueParser() - Constructor for class pro.johndunlap.getopt.DefaultValueParser
 
description() - Method in annotation type pro.johndunlap.getopt.annotation.Arg
The description of the option.
description() - Method in annotation type pro.johndunlap.getopt.annotation.GetOptOrdered
The description of the option.
DuplicateOptionException - Exception in pro.johndunlap.getopt.exception
Thrown when a duplicate option is found.
DuplicateOptionException(String, Field) - Constructor for exception pro.johndunlap.getopt.exception.DuplicateOptionException
 
DuplicateOptionException(String, Throwable, Field) - Constructor for exception pro.johndunlap.getopt.exception.DuplicateOptionException
 
DuplicateOptionException(Throwable, Field) - Constructor for exception pro.johndunlap.getopt.exception.DuplicateOptionException
 

E

execute(ParseContext<T>) - Method in enum pro.johndunlap.getopt.Parser
 
exit(int) - Method in interface pro.johndunlap.getopt.ExitMechanism
Normally, this will call System.exit(int).
ExitMechanism - Interface in pro.johndunlap.getopt
This interface allows unit tests to override the exit mechanism.
exitStatus() - Method in annotation type pro.johndunlap.getopt.annotation.Arg
If set to a non-zero value, this is the exit status which will be set if binding fails for this property.
extract(Class<T>) - Method in class pro.johndunlap.getopt.GetOpt
This method is shared between the bind and help methods.

F

findGetterMethod(Field) - Static method in class pro.johndunlap.getopt.ReflectionUtil
Attempts to find a getter method for the given field.
findSetterMethod(Field) - Static method in class pro.johndunlap.getopt.ReflectionUtil
Attempts to find a setter method for the given field.
flag() - Method in annotation type pro.johndunlap.getopt.annotation.Arg
The name of the option.
FLAG - pro.johndunlap.getopt.Parser
 

G

getCategory() - Method in class pro.johndunlap.getopt.OptionInfo
 
getCode() - Method in class pro.johndunlap.getopt.OptionInfo
 
getDescription() - Method in class pro.johndunlap.getopt.OptionInfo
 
getErr() - Method in class pro.johndunlap.getopt.GetOpt
 
getExitStatus() - Method in exception pro.johndunlap.getopt.exception.ParseException
Returns the exit status which should be passed back to the shell for this exception.
getField() - Method in exception pro.johndunlap.getopt.exception.DuplicateOptionException
 
getField() - Method in exception pro.johndunlap.getopt.exception.ParseException
 
getFieldValue(Field, Object) - Static method in class pro.johndunlap.getopt.ReflectionUtil
This method attempts to get the value of a field without violating its declared access modifiers.
getFlag() - Method in class pro.johndunlap.getopt.OptionInfo
 
getInstance() - Method in class pro.johndunlap.getopt.ParseContext
 
getNoArgConstructor(Class<?>) - Static method in class pro.johndunlap.getopt.ReflectionUtil
Attempts to find a no-arg constructor for the given class.
GetOpt - Class in pro.johndunlap.getopt
The main entry point for the getopt-databind library.
GetOpt() - Constructor for class pro.johndunlap.getopt.GetOpt
 
GetOptOrdered - Annotation Type in pro.johndunlap.getopt.annotation
Annotation used to mark a field as an ordered argument.
getOut() - Method in class pro.johndunlap.getopt.GetOpt
 
getQueue() - Method in class pro.johndunlap.getopt.ParseContext
 
getRequiredFields() - Method in class pro.johndunlap.getopt.ParseContext
 
getType() - Method in class pro.johndunlap.getopt.DefaultValueParser
 
getType() - Method in interface pro.johndunlap.getopt.TypeConverter
 
getValue() - Method in exception pro.johndunlap.getopt.exception.ParseException
 

H

help(Class<T>) - Method in class pro.johndunlap.getopt.GetOpt
Generates a help message for the given class type.
Help - Annotation Type in pro.johndunlap.getopt.annotation
This annotation provides additional metadata for the help text beyond what would otherwise have been available with just the field level annotations.
helpExitStatus() - Method in annotation type pro.johndunlap.getopt.annotation.Help
The exit status which should be used when the help message is invoked.
helpTokens() - Method in annotation type pro.johndunlap.getopt.annotation.Help
The tokens which should trigger the display of the help message.
hyphenCaseToCamelCase(String) - Static method in enum pro.johndunlap.getopt.Parser
Convert a hyphen case string to camel case.

I

Ignore - Annotation Type in pro.johndunlap.getopt.annotation
Annotation to ignore a field when parsing command line arguments.
InaccessibleFieldException - Exception in pro.johndunlap.getopt.exception
Thrown when a field cannot be accessed.
InaccessibleFieldException(String, Throwable, Class<?>) - Constructor for exception pro.johndunlap.getopt.exception.InaccessibleFieldException
 
instantiate(Class<?>) - Static method in class pro.johndunlap.getopt.ReflectionUtil
This method attempts to construct an instance of the given class without violating its declared access modifiers.
instantiateCollection(Class<Collection<?>>) - Static method in class pro.johndunlap.getopt.ReflectionUtil
 
isArray(Class<?>) - Method in class pro.johndunlap.getopt.ReflectionUtil
 
isBoolean() - Method in class pro.johndunlap.getopt.ParseContext
Returns true if the current flag is a boolean flag.
isBoolean(Class<?>) - Static method in class pro.johndunlap.getopt.ReflectionUtil
Returns true if the given type is a byte type (Boolean or boolean).
isByte(Class<?>) - Static method in class pro.johndunlap.getopt.ReflectionUtil
Returns true if the given type is a byte type (Byte or byte).
isCharacter(Class<?>) - Static method in class pro.johndunlap.getopt.ReflectionUtil
Returns true if the given type is a character type (Character or char).
isCollection(Class<?>) - Static method in class pro.johndunlap.getopt.ReflectionUtil
 
isDouble(Class<?>) - Static method in class pro.johndunlap.getopt.ReflectionUtil
Returns true if the given type is a double type (Double or double).
isFloat(Class<?>) - Static method in class pro.johndunlap.getopt.ReflectionUtil
Returns true if the given type is a float type (Float or float).
isHelpRequested() - Method in class pro.johndunlap.getopt.ParseContext
 
isHelpToken(String) - Method in class pro.johndunlap.getopt.ParseContext
 
isInteger(Class<?>) - Static method in class pro.johndunlap.getopt.ReflectionUtil
Returns true if the given type is a byte type (Integer or int).
isLong(Class<?>) - Static method in class pro.johndunlap.getopt.ReflectionUtil
Returns true if the given type is a byte type (Long or long).
isRequired() - Method in class pro.johndunlap.getopt.OptionInfo
 
isShort(Class<?>) - Static method in class pro.johndunlap.getopt.ReflectionUtil
Returns true if the given type is a byte type (Short or short).

M

main(String[]) - Static method in class pro.johndunlap.getopt.Main
 
Main - Class in pro.johndunlap.getopt
This is an example of how to use the GetOpt library.
Main() - Constructor for class pro.johndunlap.getopt.Main
 
max() - Method in annotation type pro.johndunlap.getopt.annotation.Arg
This is ignored for fields which are not collections.
min() - Method in annotation type pro.johndunlap.getopt.annotation.Arg
This is ignored for fields which are not collections.
MissingNoArgConstructorException - Exception in pro.johndunlap.getopt.exception
Thrown when a class does not have a default constructor.
MissingNoArgConstructorException(String, Throwable, Class<?>) - Constructor for exception pro.johndunlap.getopt.exception.MissingNoArgConstructorException
 

N

name() - Method in annotation type pro.johndunlap.getopt.annotation.Help
The name of the program.
NEUTRAL - pro.johndunlap.getopt.Parser
 

O

openingText() - Method in annotation type pro.johndunlap.getopt.annotation.Help
The text to display prior to the list of options.
OptionInfo - Class in pro.johndunlap.getopt
A class which contains information about a single option.
OptionInfo(Field) - Constructor for class pro.johndunlap.getopt.OptionInfo
Creates a new OptionInfo object from the given field.
order() - Method in annotation type pro.johndunlap.getopt.annotation.Arg
The index into the array of ordered arguments(not specified with a code/flag).
order() - Method in annotation type pro.johndunlap.getopt.annotation.GetOptOrdered
The index into the array of ordered arguments(not specified with a code/flag).

P

parse(Class<T>, String) - Static method in class pro.johndunlap.getopt.ReflectionUtil
Parses a string value into an object of the given type.
parse(String, Class<?>, TypeConverter<?>) - Method in class pro.johndunlap.getopt.ParseContext
 
ParseContext<T> - Class in pro.johndunlap.getopt
Maintains the state of the parsing process.
ParseContext(Class<T>, String[], Map<Class<?>, TypeConverter<?>>) - Constructor for class pro.johndunlap.getopt.ParseContext
Create a new ParseContext for the given class type and string arguments.
ParseException - Exception in pro.johndunlap.getopt.exception
Thrown when a value cannot be parsed.
ParseException(Field, String) - Constructor for exception pro.johndunlap.getopt.exception.ParseException
 
ParseException(Field, String, String) - Constructor for exception pro.johndunlap.getopt.exception.ParseException
Constructs a new exception with the specified field, value, and message.
ParseException(String) - Constructor for exception pro.johndunlap.getopt.exception.ParseException
 
ParseException(String, String) - Constructor for exception pro.johndunlap.getopt.exception.ParseException
 
ParseException(String, Throwable) - Constructor for exception pro.johndunlap.getopt.exception.ParseException
 
ParseException(Throwable) - Constructor for exception pro.johndunlap.getopt.exception.ParseException
 
Parser - Enum in pro.johndunlap.getopt
The parser is responsible for parsing the command line arguments.
pro.johndunlap.getopt - package pro.johndunlap.getopt
 
pro.johndunlap.getopt.annotation - package pro.johndunlap.getopt.annotation
 
pro.johndunlap.getopt.exception - package pro.johndunlap.getopt.exception
 

R

read(Class<T>, String[]) - Method in class pro.johndunlap.getopt.GetOpt
Binds the given arguments to the given class type.
read(String) - Method in class pro.johndunlap.getopt.DefaultValueParser
 
read(String) - Method in interface pro.johndunlap.getopt.TypeConverter
 
readContext(Class<T>, String[]) - Method in class pro.johndunlap.getopt.GetOpt
Same as GetOpt.read(Class, String[]) except that it returns a ParseContext instead of the instance.
ReflectionUtil - Class in pro.johndunlap.getopt
A utility class which contains reflective methods for working with Java objects.
register(Class<?>, TypeConverter<?>) - Method in class pro.johndunlap.getopt.GetOpt
 
register(Map<Class<?>, TypeConverter<?>>) - Method in class pro.johndunlap.getopt.GetOpt
 
required() - Method in annotation type pro.johndunlap.getopt.annotation.Arg
True if the option requires a value.
required() - Method in annotation type pro.johndunlap.getopt.annotation.GetOptOrdered
True if the option requires a value.
RethrownException - Exception in pro.johndunlap.getopt.exception
Used to rethrow other exceptions as parse exceptions.
RethrownException(String, Throwable) - Constructor for exception pro.johndunlap.getopt.exception.RethrownException
 
RethrownException(Throwable) - Constructor for exception pro.johndunlap.getopt.exception.RethrownException
 
run(Class<T>, String[]) - Method in class pro.johndunlap.getopt.GetOpt
This method automates the mechanics behind binding, error handling, and displaying the help message.

S

setCurrentName(String) - Method in class pro.johndunlap.getopt.ParseContext
 
setErr(PrintStream) - Method in class pro.johndunlap.getopt.GetOpt
 
setExitMechanism(ExitMechanism) - Method in class pro.johndunlap.getopt.GetOpt
 
setFieldValue(Field, Object, Object) - Static method in class pro.johndunlap.getopt.ReflectionUtil
This method attempts to set the value of a field without violating its declared access modifiers.
setHelpRequested(boolean) - Method in class pro.johndunlap.getopt.ParseContext
 
setNamedValue(String) - Method in class pro.johndunlap.getopt.ParseContext
Sets the value of the current named property in the parse context to the given value.
setOrderedValue(String) - Method in class pro.johndunlap.getopt.ParseContext
Sets the value of the current ordered property in the parse context to the given string value.
setOut(PrintStream) - Method in class pro.johndunlap.getopt.GetOpt
 
showHelp(Class<T>) - Method in class pro.johndunlap.getopt.GetOpt
 
showHelpOnError() - Method in annotation type pro.johndunlap.getopt.annotation.Help
True if the help message should be displayed when an error occurs and false otherwise.

T

TypeConverter<P> - Interface in pro.johndunlap.getopt
Implementations of this interface are used to parse string values into object instances which are not supported by default.

U

UnsupportedTypeConversionException - Exception in pro.johndunlap.getopt.exception
Thrown when binding to a type is not supported.
UnsupportedTypeConversionException(String) - Constructor for exception pro.johndunlap.getopt.exception.UnsupportedTypeConversionException
 

V

VALUE - pro.johndunlap.getopt.Parser
 
valueOf(String) - Static method in enum pro.johndunlap.getopt.Parser
Returns the enum constant of this type with the specified name.
values() - Static method in enum pro.johndunlap.getopt.Parser
Returns an array containing the constants of this enum type, in the order they are declared.

W

write(String) - Method in class pro.johndunlap.getopt.DefaultValueParser
 
write(P) - Method in interface pro.johndunlap.getopt.TypeConverter
 
A C D E F G H I M N O P R S T U V W 
All Classes All Packages