Enum Class OptionArg

java.lang.Object
java.lang.Enum<OptionArg>
org.gnome.glib.OptionArg
All Implemented Interfaces:
Serializable, Comparable<OptionArg>, Constable, Enumeration

@Generated("org.javagi.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 Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The option provides a callback (of type GOptionArgFunc) 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 Type
    Method
    Description
    int
    Get the numeric value of this enum
    static OptionArg
    of(int value)
    Create a new OptionArg for the provided value
    static OptionArg
    of(MemorySegment address)
    Create a new OptionArg for the value in the provided memory address.
    static OptionArg
    Returns the enum constant of this class with the specified name.
    static OptionArg[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • NONE

      public static final OptionArg NONE
      No extra argument. This is useful for simple flags or booleans.
    • STRING

      public static final OptionArg STRING
      The option takes a UTF-8 string argument.
    • INT

      public static final OptionArg INT
      The option takes an integer argument.
    • CALLBACK

      public static final OptionArg CALLBACK
      The option provides a callback (of type GOptionArgFunc) to parse the extra argument.
    • FILENAME

      public static final OptionArg FILENAME
      The option takes a filename as argument, which will be in the GLib filename encoding rather than UTF-8.
    • STRING_ARRAY

      public static final OptionArg STRING_ARRAY
      The option takes a string argument, multiple uses of the option are collected into an array of strings.
    • FILENAME_ARRAY

      public static final OptionArg FILENAME_ARRAY
      The option takes a filename as argument, multiple uses of the option are collected into an array of strings.
    • DOUBLE

      public static final OptionArg 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

      public static final OptionArg INT64
      The option takes a 64-bit integer. Like INT but for larger numbers. The number can be in decimal base, or in hexadecimal (when prefixed with 0x, for example, 0xffffffff). Since 2.12
  • Method Details

    • values

      public static OptionArg[] 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

      public static OptionArg valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • of

      public static OptionArg of(int value)
      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 interface Enumeration
      Returns:
      the enum value
    • of

      public static OptionArg of(MemorySegment address)
      Create a new OptionArg for the value in the provided memory address.
      Parameters:
      address - the memory address holding a enum value
      Returns:
      the enum for the value in the provided memory address