class Options.OptionInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) java.lang.String[] |
aliases
Aliases for this option.
|
(package private) java.lang.Class<?> |
baseType
Class type of this field.
|
(package private) @Nullable java.lang.reflect.Constructor<?> |
constructor
Constructor that takes one String for the type.
|
(package private) @Nullable java.lang.String |
defaultStr
Default value of the option as a string.
|
(package private) java.lang.String |
description
Argument description: the first line.
|
(package private) @MonotonicNonNull java.util.Map<java.lang.String,java.lang.String> |
enumJdoc
Maps names of enum constants to their corresponding Javadoc.
|
(package private) @Nullable java.lang.reflect.Method |
factory
Factory that takes a string (some classes don't have a string constructor) and always returns
non-null.
|
(package private) @Nullable java.lang.Object |
factoryArg2
The second argument to the factory; non-null if needed.
|
(package private) java.lang.reflect.Field |
field
What variable the option sets.
|
(package private) @Nullable java.lang.String |
jdoc
Full Javadoc description.
|
(package private) @MonotonicNonNull java.util.List<java.lang.Object> |
list
If the option is a list, this references that list.
|
(package private) java.lang.String |
longName
Long argument name.
|
(package private) boolean |
noDocDefault
If true, the default value string for this option will be excluded from OptionsDoclet
documentation.
|
(package private) @UnknownInitialization @Raw @Nullable java.lang.Object |
obj
Object containing the field.
|
(package private) @Nullable java.lang.String |
shortName
Short (one-character) argument name.
|
(package private) java.lang.String |
typeName
Name of the argument type.
|
(package private) boolean |
unpublicized
If true, this OptionInfo is not output when printing documentation.
|
Constructor and Description |
---|
OptionInfo(java.lang.reflect.Field field,
Option option,
@UnknownInitialization @Raw @Nullable java.lang.Object obj,
boolean unpublicized)
Create a new OptionInfo.
|
Modifier and Type | Method and Description |
---|---|
boolean |
argumentRequired()
Return whether or not this option has a required argument.
|
java.lang.Class<?> |
getDeclaringClass()
Returns the class that declares this option.
|
java.lang.String |
synopsis()
Returns a short synopsis of the option in the form
-s --long=<type> . |
java.lang.String |
toString()
Return a one-line description of the option.
|
java.lang.reflect.Field field
@UnknownInitialization @Raw @Nullable java.lang.Object obj
@Nullable java.lang.String shortName
java.lang.String longName
java.lang.String[] aliases
java.lang.String description
@Nullable java.lang.String jdoc
@MonotonicNonNull java.util.Map<java.lang.String,java.lang.String> enumJdoc
java.lang.String typeName
java.lang.Class<?> baseType
@Nullable java.lang.String defaultStr
boolean noDocDefault
@MonotonicNonNull java.util.List<java.lang.Object> list
@Nullable java.lang.reflect.Constructor<?> constructor
@Nullable java.lang.reflect.Method factory
@Nullable java.lang.Object factoryArg2
boolean unpublicized
Options.printUsage()
OptionInfo(java.lang.reflect.Field field, Option option, @UnknownInitialization @Raw @Nullable java.lang.Object obj, boolean unpublicized)
field
- the field to setoption
- the optionobj
- the object whose field will be set; if obj is null, the field must be staticunpublicized
- whether the option is unpublicizedpublic boolean argumentRequired()
public java.lang.String synopsis()
-s --long=<type>
.@SideEffectFree public java.lang.String toString(@GuardSatisfied Options.OptionInfo this)
toString
in class java.lang.Object
public java.lang.Class<?> getDeclaringClass()