Class Model<M extends Model>

java.lang.Object
eu.bandm.tools.option.runtime.Model<M>
Direct Known Subclasses:
BatchOptions, CallXsltOptions, InsertOverprintOptions, JarLinkerOptions, JWhichOptions, Options, Options, Options, Options, Options, Options, Options, ParameterExpanderOptions, ToolOptions

public abstract class Model<M extends Model> extends Object
The common base class of all models generated by the the option compiler, as implemented in Compiler.

It contains

  • the basic parsing methods, which are called by the generated code,
  • and some auxiliary methods callable by the user after successful parsing.

It is multi-lingual only indirectly, by the message pipeline used in the parser process, and by the generated code for usage() and usage(String).

The fundamental control flow when parsing is a "ping-pong" between generated code and runtime library:

  parse(String[], msgr)
    V
    parse(String, msgr) // blanks are escaped !
      |
      V                   /
     main parsing loop    ======================================= \
      |                   \   (recover after error!)                \
      V                                                               \
     -------------------------------------- GENERATED CODE            |
    |   parseName           /parseAbbrev/parsePositionals             |
    |      V                          |                               |
    |      parse_              |                               |
    |         |   |   |               |                               |
     ---------------------------------|---------------------          |
              |   |   V               |                               |
              |   V   parseEnum       |                               |
              V   parseInt            |                               |
              parseInit   |           |                               |
                          V           V                               |
                      TYPE_ERROR  ERROR_UNKNOWN_NAME                  /
                              \         \                            /
                               \_________\_________>THROW exception /

Please not that the lexer process = the tokenization (implemented by getNextToken()) is driven by the top-level parsing process: A long-name option key and an argument token are all characters up to the next whitespace (or end of input), but a short-name option token is only the next character.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static class 
    Thrown if option appears more than once.
    protected static class 
    Thrown if the type of an argument menas to end a repetition group.
    protected static class 
    Thrown if argument is needed, but end of line reached.
    protected static class 
    Thrown if end of line reached when new positional option could start.
    protected static class 
    Thrown if "skip to next option" error recovery reaches end of input.
    protected static class 
    Thrown if option name / abbrev is unknown.
    protected static class 
    Thrown if argument is of wrong type.
    static class 
    An adapter which escapes blanks contained in an opt arg by a backslash.
    static class 
    An adapter which encloses empty string values or string values containing double double quotes or blanks in double quotes, The contained double quotes are escaped by backslashes.
    (package private) static interface 
    Adapter for different shell behaviour when passing options by command line.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
    Number of the argument currently being parsed.
    protected int
    Number of the repeting group which is under parsing, or -1 in case the fixed part is currently being parsed.
    protected String
    Human readable identification of the option currently being parsed.
    protected int
    Position/column number which will be printed in error messages.
    Filled in by generated code.
    protected static final Rational
    Dummy value returned in case of parsing error.
    static final String
     
    boolean
    Reflects whether there are any payload-options in the parsed command line.
    protected int
    Length of inputstring.
    protected String
    Input concatentated into one single string, only input data for the parsing process.
    protected Matcher
    Re-used matcher for the input, once loaded with string data, then re-linked to different patterns.
    final Messages
    Translation catalog for the generic = non-payload messages The payload messages (specific for the options) are in descriptions.
    Target of all error messages, warnings, etc.
    protected @Opt String
    Argument token, written by getNextToken(), which uses the shellAdapter, and read by type-specific scanners parseInt(), etc., and cleared by these, when consuming.
    protected String
    Set by the main loop when decoding an option name or abbrev, and only read for error messaging.
    (package private) final Pattern
    Pattern to recognize the explict boolean parameter values.
    protected final Pattern
    Pattern which matches any non-blank rest on the command line, to generate the corresponding error message.
    protected boolean
    Set by runtime code for correct end-of-cmdline handling.
    protected boolean
    Set by generated code, whenever a positional option has already been set explicitly.
    protected boolean
    Set by generated code, whenever a positional option is set implicitly.
    protected StringBuilder
    Text which reflects the parsing and interpretation process, for debugging only.
    The instance used for parsing and for serialization.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    Callback, overridden by compiled code.
    protected abstract String
    Is overridden in the generated code and concatenates the "longest names" of all otions marked as required, but not present in the parsed input.
    protected abstract String
    Callback, overridden by compiled code.
    protected void
    Generate error message related to the current option, the argument number, and (possibly) the repetition group number.
    protected void
    Generate error message related to the current option, the argument number, and (possibly) the repetition group number.
    protected boolean
    Returns only true if the next consumable input is not an option key (i.e.
    protected abstract void
    The generated code will evaluate all conditions to activate/deactive options in the GUI.
    static int
    Convert the text string to a number, either hexadecimally, when starting with 0x, otherwise decimally.
    static String
    Generated MuLi-Catalog key to store a (multilingual) comment field.
    static String
    Generated MuLi-Catalog key to store the description of an enum type.
    static String
    Generated MuLi-Catalog key to store the description of an enum type.
    static String
    Generated MuLi-Catalog key to store the description of an enum item value.
    protected void
    ERROR(String s, Object... rest)
    Only source of error messages.
    protected void
    Generate the error message that the repeting group of "plus" type is empty.
    protected void
    Called from compiled code and the end of the switch between short optipn names.
    protected void
    Called from compiled code and the end of the switch between long optipn names.
    Get parsing input, maybe constructed from a String-array.
    Get String of missing parameters, is empty if none are missing.
    protected void
    If nextToken is ==null, then deocde next token from the inputstring, using the shellAdapter.
    protected void
    Get next token in a parsing situation where an argument is mandatory, according to the type declaration of curOption.
     
    protected void
    HINT(String s, Object... rest)
    Only source of hint messages.
    protected String
    INSITU(String key, String... data)
    Allows to add a new translation to messages at the place of their usage.
    abstract M
    Overriden by the generated code to make a constructor call of the actual Model (sub-)class.
    protected abstract int
    The generated code will return the number of positional parameters.
    void
    The main entry for setting all values according to some command line input, as reaching public void main(String[]) from some exec system call.
    protected abstract void
    Callback, overridden by compiled code, which realizes a switch over all one character option names.
    protected boolean
    Parser function, only called when a boolean argument representation must necessarily be consumed, according to the current option's type grammar.
    protected boolean
    Called by compiled code for "switch-type", argument-less options.
    protected @Opt Boolean
    Aux method which returns whether a boolean representation is parsed.
    protected <E extends Enum<E>>
    E
    parseEnum(Class<E> enumclass)
    Parser function, only called from the compiled code when an enumeration item of the given type must necessarily be consumed, according to the current option's type grammar.
    protected <E extends Enum<E>>
    EnumSet<E>
    parseEnumSet(Class<E> enumclass)
    Parser function, only called from the compiled code when a (possibly empty) set of enumeration items of the given type is expected according to the current option's type grammar.
    protected double
    Parser function, only called from the compiled code when an float argument representation must necessarily be consumed, according to the current option's type grammar.
    protected void
    parseInit(String opt, boolean hasIt)
    Called from compiled code when starting the parsing of the arguments for a recognized/accepted option key.
    protected int
    Parser function, only called from the compiled code when an integer argument representation must necessarily be consumed, according to the current option's type grammar.
    protected int
    Parser function, only called from the compiled code when an integer argument representation must necessarily be consumed, according to the current option's type grammar.
    protected abstract void
    Callback, overridden by compiled code, which realizes a switch over all long option names.
    void
    Central entry point for parsing.
    void
    parseOneString(String s, MessageReceiver<SimpleMessage<String>> mr, boolean gnuVersion)
    Central entry point for parsing.
    void
    Central entry point for parsing.
    protected @Opt String
    Parser function, only called from the compiled code when a String argument representation must necessarily be consumed, according to the current option's type grammar.
    protected abstract void
    Callback, overridden by compiled code, which calls one after the other the positional parameters.
    protected Rational
    Parser function, only called from the compiled code when a rational argument representation must necessarily be consumed, according to the current option's type grammar.
    protected String
    Parser function, only called from the compiled code when a String argument representation must necessarily be consumed, according to the current option's type grammar.
    protected void
    Append a string to the parsing protocol.
    protected void
    Append the name of the option and set parentheses to the parsing protocol.
    abstract String
    Called to generate a String representation of the model's state.
    protected static String
    serialize(boolean value)
    Called by compiled code.
    protected static String
    serialize(char value)
    Called by compiled code.
    protected static String
    serialize(double value)
    Called by compiled code.
    protected static String
    serialize(int value)
    Called by compiled code.
    protected static <E extends Enum<E>>
    String
    serialize(E value)
    Called by compiled code.
    protected static String
    Called by compiled code.
    protected String
    Called by compiled code.
    protected static <E extends Enum<E>>
    String
    serialize(EnumSet<E> value)
    Called by compiled code.
    protected static String
    serialize_hex(int value)
    Called by compiled code.
    protected void
    Skip input to next option token.
    protected void
    Generate error message on wrong argument type and throw the corresponding exception.
    protected void
    The next token bo be parsed as an argument does not match the type expected according to the current options's declaration.
    protected void
    The next token bo be parsed as an argument does not match the type expected according to the current options's declaration.
    void
    Supply the standard printstream System.err and call the generated code.
    abstract void
    The generated code will print the documentation text of all options, in the default language.
    abstract void
    usage(PrintStream ps, String language)
    The generated code will print the documentation text of all options, in the given language.
    void
    usage(String lang)
    Supply the standard printstream System.err and call the generated code.
    protected void
    WARNING(String s, Object... rest)
    Only source of warning messages.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • GNU_VERSION_OPTION

      public static final String GNU_VERSION_OPTION
      See Also:
    • shellAdapter

      protected Model.ShellAdapter shellAdapter
      The instance used for parsing and for serialization. E.g. in error messages. Can be changed by subclassing.
    • messages

      public final Messages messages
      Translation catalog for the generic = non-payload messages The payload messages (specific for the options) are in descriptions.
    • msg

      Target of all error messages, warnings, etc.
    • protocol

      protected transient StringBuilder protocol
      Text which reflects the parsing and interpretation process, for debugging only. Can be retrieved after successful and erroneous parsing by getParsingProtocol(). The entering the parsing of an option with name "xxx" is indicated by "xxx(" and the recognized argument types follow, like "int", "string", etc.
    • descriptions

      public CatalogByString descriptions
      Filled in by generated code. Needed by the GUI for dynamic tool-tip translation.
    • hasNonMetaOptions

      public boolean hasNonMetaOptions
      Reflects whether there are any payload-options in the parsed command line.
    • inputstring

      protected String inputstring
      Input concatentated into one single string, only input data for the parsing process.
    • inputlength

      protected transient int inputlength
      Length of inputstring. For conveniece, because it is frequently used in Matcher set-ups.
    • curOption

      protected transient String curOption
      Human readable identification of the option currently being parsed. Used for error message generation. Set by the generated code when calling parseInit(String, boolean).
    • curArg

      protected transient int curArg
      Number of the argument currently being parsed. This is relative to begin of the option's type list, or to the beginnig of the repeting group. Is initialized by parseInit(String,boolean) to -1 and incremented by the generated code before each call to the primitive parser.
    • curArgGroup

      protected transient int curArgGroup
      Number of the repeting group which is under parsing, or -1 in case the fixed part is currently being parsed.
    • p_rest

      protected final Pattern p_rest
      Pattern which matches any non-blank rest on the command line, to generate the corresponding error message. Trying to detect such a rest simply by getNextToken() does not work, because eg. "a will not be accepted.
    • matcher

      protected transient Matcher matcher
      Re-used matcher for the input, once loaded with string data, then re-linked to different patterns.
    • nextToken

      @Opt protected transient @Opt String nextToken
      Argument token, written by getNextToken(), which uses the shellAdapter, and read by type-specific scanners parseInt(), etc., and cleared by these, when consuming.
    • currentErrorPos

      protected transient int currentErrorPos
      Position/column number which will be printed in error messages. Is the start column of nextToken and set by the shellAdapter.
    • positionalsExplicit

      protected boolean positionalsExplicit
      Set by generated code, whenever a positional option has already been set explicitly.
    • positionalsFound

      protected boolean positionalsFound
      Set by generated code, whenever a positional option is set implicitly.
    • positionalPhase

      protected boolean positionalPhase
      Set by runtime code for correct end-of-cmdline handling.
    • optionDirector

      protected String optionDirector
      Set by the main loop when decoding an option name or abbrev, and only read for error messaging.
    • dummyRat

      protected static final Rational dummyRat
      Dummy value returned in case of parsing error.
    • p_bool

      final Pattern p_bool
      Pattern to recognize the explict boolean parameter values.
  • Constructor Details

    • Model

      public Model()
  • Method Details

    • usage

      public abstract void usage(PrintStream ps)
      The generated code will print the documentation text of all options, in the default language. For each option print its names, its argument type structure and the description in the selected language.
    • usage

      public abstract void usage(PrintStream ps, String language)
      The generated code will print the documentation text of all options, in the given language. For each option print its names, its argument type structure and the description in the selected language.
    • checkActive

      protected abstract void checkActive()
      The generated code will evaluate all conditions to activate/deactive options in the GUI.
    • numberOfPositionals

      protected abstract int numberOfPositionals()
      The generated code will return the number of positional parameters.
    • usage

      public void usage()
      Supply the standard printstream System.err and call the generated code.
    • usage

      public void usage(String lang)
      Supply the standard printstream System.err and call the generated code.
    • INSITU

      protected String INSITU(String key, String... data)
      Allows to add a new translation to messages at the place of their usage. The return result is the un-translated key.
    • ERROR

      protected void ERROR(String s, Object... rest)
      Only source of error messages.
    • HINT

      protected void HINT(String s, Object... rest)
      Only source of hint messages.
    • WARNING

      protected void WARNING(String s, Object... rest)
      Only source of warning messages.
    • putprot

      protected void putprot(String s)
      Append a string to the parsing protocol.
    • putprot_option

      protected void putprot_option(String s)
      Append the name of the option and set parentheses to the parsing protocol.
    • getParsingProtocol

      public String getParsingProtocol()
      Returns:
      the parsing protocol, for debugging.
    • descriptionKeyForEnum

      public static String descriptionKeyForEnum(MetaClass cl)
      Generated MuLi-Catalog key to store the description of an enum type.
    • descriptionKeyForEnum

      public static String descriptionKeyForEnum(Class<?> cl)
      Generated MuLi-Catalog key to store the description of an enum type.
    • descriptionKeyForEnumItem

      public static String descriptionKeyForEnumItem(Class<?> cl, Object item)
      Generated MuLi-Catalog key to store the description of an enum item value.
    • descriptionKeyForCommentField

      public static String descriptionKeyForCommentField(String name)
      Generated MuLi-Catalog key to store a (multilingual) comment field.
    • makeDefaultInstance

      public abstract M makeDefaultInstance()
      Overriden by the generated code to make a constructor call of the actual Model (sub-)class.
    • _finalCheck

      protected abstract void _finalCheck()
      Callback, overridden by compiled code.
    • _getRedundantOptions

      protected abstract String _getRedundantOptions()
      Callback, overridden by compiled code.
    • parseAbbrev

      protected abstract void parseAbbrev(String s)
      Callback, overridden by compiled code, which realizes a switch over all one character option names. The generated code calls the argument parsers and stores the resulting values to the model's fields.
      Parameters:
      s - the one-character option name, as parsed by this code.
    • parseName

      protected abstract void parseName(String s)
      Callback, overridden by compiled code, which realizes a switch over all long option names. The generated code calls the argument parsers and stores the resulting values to the model's fields.
      Parameters:
      s - the multi-character option name, as parsed by this code.
    • parsePositionals

      protected abstract void parsePositionals()
      Callback, overridden by compiled code, which calls one after the other the positional parameters. Each of them corresponds to an implicit option (with short names "-0", "-1", "-2", ...). These can also be defined explicitly, e.g. be given a long name, etc. Anyhow, they can be set explicitly by their short name. If one single positional option is given explicitly, the implicit parsing of the others is suppressed and this code will not be called.
    • ARG_ERROR

      protected void ARG_ERROR(String msg)
      Generate error message related to the current option, the argument number, and (possibly) the repetition group number.
      Parameters:
      msg - must be marked for embedding translation
    • ARG_ERROR

      protected void ARG_ERROR(MessageFormatter.Formandum msg)
      Generate error message related to the current option, the argument number, and (possibly) the repetition group number.
      Parameters:
      msg - is the context-dependend error messages, is thus marked for translation and expansion and has possibly arguments on its own.
    • ERROR_plus

      protected void ERROR_plus()
      Generate the error message that the repeting group of "plus" type is empty.
    • TYPE_MISMATCH

      protected void TYPE_MISMATCH(String text)
      The next token bo be parsed as an argument does not match the type expected according to the current options's declaration.
      See Also:
    • TYPE_MISMATCH

      protected void TYPE_MISMATCH(MessageFormatter.Formandum text)
      The next token bo be parsed as an argument does not match the type expected according to the current options's declaration. If this argument is the first in a repetiontion group, then this is allowed and simply means the end of this group. Otherwise an error is generateod by calling type_error(Embed).
    • type_error

      protected void type_error(MessageFormatter.Formandum text)
      Generate error message on wrong argument type and throw the corresponding exception. The next higher level will try to resume parsing with the next option.
      Throws:
      Model.ExcWrongType
    • skipToOption

      protected void skipToOption()
      Skip input to next option token. Only called for error recovery, at end of main parsing loop.
      Throws:
      Model.ExcSkipReachesEnd - if no option token can be found in the rest of the input.
    • canReenterRepetitionGroup

      protected boolean canReenterRepetitionGroup()
      Returns only true if the next consumable input is not an option key (i.e. starting with "-"), AND there is more character data. Because of the first condition, repeting argument groups can unfortunately not start with a negative number.
    • getNextToken

      protected void getNextToken()
      If nextToken is ==null, then deocde next token from the inputstring, using the shellAdapter.
    • getNextToken_required

      protected void getNextToken_required()
      Get next token in a parsing situation where an argument is mandatory, according to the type declaration of curOption. Therefore here errors can be generated and an exception be thrown to the option loop.
    • parse

      public void parse(String[] args, MessageReceiver<SimpleMessage<String>> mr, @Opt @Opt String language)
      The main entry for setting all values according to some command line input, as reaching public void main(String[]) from some exec system call.
      Parameters:
      language - if != null, all messages will be sent translated. Otherwise the translation must happen later in the message pipeline, using messages explicitly.
    • getInputString

      public String getInputString()
      Get parsing input, maybe constructed from a String-array.
    • parseOneString

      public void parseOneString(String s, MessageReceiver<SimpleMessage<String>> mr, @Opt @Opt String lang)
      Central entry point for parsing. Here the command line data is already packed into one single String, with escaped blanks, and the user language for messages can be switched. If no language is provided, the translation must happen later in the message pipeline, using Messages explicitly.
    • parseOneString

      public void parseOneString(String s, MessageReceiver<SimpleMessage<String>> mr)
      Central entry point for parsing. Call parseOneString(String, MessageReceiver, boolean) with gnu mode set to true,
    • parseOneString

      public void parseOneString(String s, MessageReceiver<SimpleMessage<String>> mr, boolean gnuVersion)
      Central entry point for parsing. Here the command line data is already packed into one single String, with escaped blanks. No translation is added to the pipeline, but this shall be done by the MessageReceiver.
      Parameters:
      gnuVersion - whether "--version" shall be treated specially: no further error checks must be applied, according to https://www.gnu.org/prep/standards/html_node/_002d_002dversion.html
    • getMissingOptions

      public String getMissingOptions()
      Get String of missing parameters, is empty if none are missing. Must be called after parsing.
    • _getMissingOptions

      protected abstract String _getMissingOptions()
      Is overridden in the generated code and concatenates the "longest names" of all otions marked as required, but not present in the parsed input. Length==0 iff none is missing. Cf "sourcedtd required='yes'" in tools/tdom_withOptions/Options.xml
    • parseInit

      protected void parseInit(String opt, boolean hasIt)
      Called from compiled code when starting the parsing of the arguments for a recognized/accepted option key. Reset all flags and counters and stores the name for error message and protocol generation.
      Parameters:
      opt - Name of option (both names, for error messages only)
      hasIt - if this option has already occured in this parsing process
    • ERROR_UNKNOWN_NAME

      protected void ERROR_UNKNOWN_NAME()
      Called from compiled code and the end of the switch between long optipn names.
    • ERROR_UNKNOWN_ABBREV

      protected void ERROR_UNKNOWN_ABBREV()
      Called from compiled code and the end of the switch between short optipn names.
    • parseInt

      protected int parseInt()
      Parser function, only called from the compiled code when an integer argument representation must necessarily be consumed, according to the current option's type grammar. Get the next argument token, convert it into a value, consume the input and return the value. If conversion is not possible, throw a type error and do not consume.
    • convert_integer_10_or_16

      public static int convert_integer_10_or_16(String s) throws NumberFormatException
      Convert the text string to a number, either hexadecimally, when starting with 0x, otherwise decimally. Only the latter case allows explicit +/- signs. Is called by the verifiers in the Gui runtime.
      Throws:
      NumberFormatException
    • parseInt_16or10

      protected int parseInt_16or10()
      Parser function, only called from the compiled code when an integer argument representation must necessarily be consumed, according to the current option's type grammar. Get the next argument token, convert it into a value, consume the input and return the value. If conversion is not possible, throw a type error and do not consume. Conversion is either hexadecimally, when starting with 0x, otherwise decimally. Only the latter case allows explicit +/- signs.
    • parseFloat

      protected double parseFloat()
      Parser function, only called from the compiled code when an float argument representation must necessarily be consumed, according to the current option's type grammar. Get the next argument token, convert it into a value, consume the input and return the value. If conversion is not possible, throw a type error and do not consume.
    • parseRational

      protected Rational parseRational()
      Parser function, only called from the compiled code when a rational argument representation must necessarily be consumed, according to the current option's type grammar. Get the next argument token, convert it into a value, consume the input and return the value. If conversion is not possible, throw a type error and do not consume.
    • parseBoolTest

      @Opt protected @Opt Boolean parseBoolTest()
      Aux method which returns whether a boolean representation is parsed. In this case it consumes the text and returns the value.
      See Also:
    • parseBool

      protected boolean parseBool()
      Parser function, only called when a boolean argument representation must necessarily be consumed, according to the current option's type grammar. Is called directly from generated code due to a normal type declaration. (For "switch type" options see parseBool_optional().
    • parseBool_optional

      protected boolean parseBool_optional()
      Called by compiled code for "switch-type", argument-less options. A boolean argument may follow, and is greedily consumed, but if not, the value defaults to true.
    • parseString

      protected String parseString()
      Parser function, only called from the compiled code when a String argument representation must necessarily be consumed, according to the current option's type grammar. Get the next argument token, take its text as the value, consume the input and return the value.
    • parseOneUri

      @Opt protected @Opt String parseOneUri()
      Parser function, only called from the compiled code when a String argument representation must necessarily be consumed, according to the current option's type grammar. Get the next argument token, convert it into a value, consume the input and return the value. If conversion is not possible, throw a type error and do not consume.
    • parseEnum

      protected <E extends Enum<E>> E parseEnum(Class<E> enumclass)
      Parser function, only called from the compiled code when an enumeration item of the given type must necessarily be consumed, according to the current option's type grammar. Get the next argument token, take its text as the value, consume the input and return the value. If conversion is not possible, throw a type error and do not consume.
    • parseEnumSet

      protected <E extends Enum<E>> EnumSet<E> parseEnumSet(Class<E> enumclass)
      Parser function, only called from the compiled code when a (possibly empty) set of enumeration items of the given type is expected according to the current option's type grammar. Consume greedily all tokens which can be interpreted as enumeration items.
    • serialize

      public abstract String serialize()
      Called to generate a String representation of the model's state. Code is overridden by the compiled code.
    • serialize

      protected static String serialize(int value)
      Called by compiled code. Always PREpend a blank to the added string constant.
    • serialize_hex

      protected static String serialize_hex(int value)
      Called by compiled code.
    • serialize

      protected static String serialize(double value)
      Called by compiled code.
    • serialize

      protected static String serialize(Rational rat)
      Called by compiled code.
    • serialize

      protected static String serialize(char value)
      Called by compiled code.
    • serialize

      protected String serialize(String value)
      Called by compiled code. The field shellAdapter is considered.
    • serialize

      protected static String serialize(boolean value)
      Called by compiled code.
    • serialize

      protected static <E extends Enum<E>> String serialize(E value)
      Called by compiled code.
    • serialize

      protected static <E extends Enum<E>> String serialize(EnumSet<E> value)
      Called by compiled code.