Package org.gnome.glib
Enum Class OptionArg
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<OptionArg>
,Constable
@Generated("io.github.jwharm.JavaGI")
public enum OptionArg
extends Enum<OptionArg>
implements Enumeration
The
GOptionArg
enum values determine which type of extra argument the
options expect to find. If an option expects an extra argument, it can
be specified in several ways; with a short option: -x arg
, with a long
option: --name arg
or combined in a single argument: --name=arg
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe option provides a callback (of typeGOptionArgFunc
) to parse the extra argument.The option takes a double argument.The option takes a filename as argument, which will be in the GLib filename encoding rather than UTF-8.The option takes a filename as argument, multiple uses of the option are collected into an array of strings.The option takes an integer argument.The option takes a 64-bit integer.No extra argument.The option takes a UTF-8 string argument.The option takes a string argument, multiple uses of the option are collected into an array of strings. -
Method Summary
Modifier and TypeMethodDescriptionint
getValue()
Get the numeric value of this enumstatic OptionArg
of
(int value) Create a new OptionArg for the provided valuestatic OptionArg
Returns the enum constant of this class with the specified name.static OptionArg[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No extra argument. This is useful for simple flags or booleans. -
STRING
The option takes a UTF-8 string argument. -
INT
The option takes an integer argument. -
CALLBACK
The option provides a callback (of typeGOptionArgFunc
) to parse the extra argument. -
FILENAME
The option takes a filename as argument, which will be in the GLib filename encoding rather than UTF-8. -
STRING_ARRAY
The option takes a string argument, multiple uses of the option are collected into an array of strings. -
FILENAME_ARRAY
The option takes a filename as argument, multiple uses of the option are collected into an array of strings. -
DOUBLE
The option takes a double argument. The argument can be formatted either for the user's locale or for the "C" locale. Since 2.12 -
INT64
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
of
Create a new OptionArg for the provided value- Parameters:
value
- the enum value- Returns:
- the enum for the provided value
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValue
in interfaceEnumeration
- Returns:
- the enum value
-