private String [] _generateArguments ()
  {
    final List <String> argsList = new ArrayList <> ();

    if (StringUtils.isNotEmpty (this.grammarEncoding))
    {
      argsList.add ("-GRAMMAR_ENCODING=" + this.grammarEncoding);
    }

    if (StringUtils.isNotEmpty (this.outputEncoding))
    {
      argsList.add ("-OUTPUT_ENCODING=" + this.outputEncoding);
    }

    if (StringUtils.isNotEmpty (this.jdkVersion))
    {
      argsList.add ("-JDK_VERSION=" + this.jdkVersion);
    }

    if (this.lookAhead != null)
    {
      argsList.add ("-LOOKAHEAD=" + this.lookAhead);
    }

    if (this.choiceAmbiguityCheck != null)
    {
      argsList.add ("-CHOICE_AMBIGUITY_CHECK=" + this.choiceAmbiguityCheck);
    }

    if (this.otherAmbiguityCheck != null)
    {
      argsList.add ("-OTHER_AMBIGUITY_CHECK=" + this.otherAmbiguityCheck);
    }

    if (this.debugParser != null)
    {
      argsList.add ("-DEBUG_PARSER=" + this.debugParser);
    }

    if (this.debugLookAhead != null)
    {
      argsList.add ("-DEBUG_LOOKAHEAD=" + this.debugLookAhead);
    }

    if (this.debugTokenManager != null)
    {
      argsList.add ("-DEBUG_TOKEN_MANAGER=" + this.debugTokenManager);
    }

    if (this.errorReporting != null)
    {
      argsList.add ("-ERROR_REPORTING=" + this.errorReporting);
    }

    if (this.javaUnicodeEscape != null)
    {
      argsList.add ("-JAVA_UNICODE_ESCAPE=" + this.javaUnicodeEscape);
    }

    if (this.unicodeInput != null)
    {
      argsList.add ("-UNICODE_INPUT=" + this.unicodeInput);
    }

    if (this.ignoreCase != null)
    {
      argsList.add ("-IGNORE_CASE=" + this.ignoreCase);
    }

    if (this.commonTokenAction != null)
    {
      argsList.add ("-COMMON_TOKEN_ACTION=" + this.commonTokenAction);
    }

    if (this.userTokenManager != null)
    {
      argsList.add ("-USER_TOKEN_MANAGER=" + this.userTokenManager);
    }

    if (this.userCharStream != null)
    {
      argsList.add ("-USER_CHAR_STREAM=" + this.userCharStream);
    }

    if (this.buildParser != null)
    {
      argsList.add ("-BUILD_PARSER=" + this.buildParser);
    }

    if (this.buildTokenManager != null)
    {
      argsList.add ("-BUILD_TOKEN_MANAGER=" + this.buildTokenManager);
    }

    if (this.tokenManagerUsesParser != null)
    {
      argsList.add ("-TOKEN_MANAGER_USES_PARSER=" + this.tokenManagerUsesParser);
    }

    if (StringUtils.isNotEmpty (this.tokenExtends))
    {
      argsList.add ("-TOKEN_EXTENDS=" + this.tokenExtends);
    }

    if (StringUtils.isNotEmpty (this.tokenFactory))
    {
      argsList.add ("-TOKEN_FACTORY=" + this.tokenFactory);
    }

    if (this.sanityCheck != null)
    {
      argsList.add ("-SANITY_CHECK=" + this.sanityCheck);
    }

    if (this.forceLaCheck != null)
    {
      argsList.add ("-FORCE_LA_CHECK=" + this.forceLaCheck);
    }

    if (this.cacheTokens != null)
    {
      argsList.add ("-CACHE_TOKENS=" + this.cacheTokens);
    }

    if (this.keepLineColumn != null)
    {
      argsList.add ("-KEEP_LINE_COLUMN=" + this.keepLineColumn);
    }

    if (this.supportClassVisibilityPublic != null)
    {
      argsList.add ("-SUPPORT_CLASS_VISIBILITY_PUBLIC=" + this.supportClassVisibilityPublic);
    }

    if (this.outputDirectory != null)
    {
      argsList.add ("-OUTPUT_DIRECTORY=" + this.outputDirectory.getAbsolutePath ());
    }

    if (StringUtils.isNotEmpty (this.javaTemplateType))
    {
      argsList.add ("-JAVA_TEMPLATE_TYPE=" + this.javaTemplateType);
    }

    if (this.inputFile != null)
    {
      argsList.add (this.inputFile.getAbsolutePath ());
    }

    return argsList.toArray (new String [argsList.size ()]);
  }
private String [ ] _generateArguments ( ) { final List < String > argsList = new ArrayList < > ( ) ; if ( StringUtils . isNotEmpty ( this . grammarEncoding ) ) { argsList . add ( "-GRAMMAR_ENCODING=" + this . grammarEncoding ) ; } if ( StringUtils . isNotEmpty ( this . outputEncoding ) ) { argsList . add ( "-OUTPUT_ENCODING=" + this . outputEncoding ) ; } if ( StringUtils . isNotEmpty ( this . jdkVersion ) ) { argsList . add ( "-JDK_VERSION=" + this . jdkVersion ) ; } if ( this . lookAhead != null ) { argsList . add ( "-LOOKAHEAD=" + this . lookAhead ) ; } if ( this . choiceAmbiguityCheck != null ) { argsList . add ( "-CHOICE_AMBIGUITY_CHECK=" + this . choiceAmbiguityCheck ) ; } if ( this . otherAmbiguityCheck != null ) { argsList . add ( "-OTHER_AMBIGUITY_CHECK=" + this . otherAmbiguityCheck ) ; } if ( this . debugParser != null ) { argsList . add ( "-DEBUG_PARSER=" + this . debugParser ) ; } if ( this . debugLookAhead != null ) { argsList . add ( "-DEBUG_LOOKAHEAD=" + this . debugLookAhead ) ; } if ( this . debugTokenManager != null ) { argsList . add ( "-DEBUG_TOKEN_MANAGER=" + this . debugTokenManager ) ; } if ( this . errorReporting != null ) { argsList . add ( "-ERROR_REPORTING=" + this . errorReporting ) ; } if ( this . javaUnicodeEscape != null ) { argsList . add ( "-JAVA_UNICODE_ESCAPE=" + this . javaUnicodeEscape ) ; } if ( this . unicodeInput != null ) { argsList . add ( "-UNICODE_INPUT=" + this . unicodeInput ) ; } if ( this . ignoreCase != null ) { argsList . add ( "-IGNORE_CASE=" + this . ignoreCase ) ; } if ( this . commonTokenAction != null ) { argsList . add ( "-COMMON_TOKEN_ACTION=" + this . commonTokenAction ) ; } if ( this . userTokenManager != null ) { argsList . add ( "-USER_TOKEN_MANAGER=" + this . userTokenManager ) ; } if ( this . userCharStream != null ) { argsList . add ( "-USER_CHAR_STREAM=" + this . userCharStream ) ; } if ( this . buildParser != null ) { argsList . add ( "-BUILD_PARSER=" + this . buildParser ) ; } if ( this . buildTokenManager != null ) { argsList . add ( "-BUILD_TOKEN_MANAGER=" + this . buildTokenManager ) ; } if ( this . tokenManagerUsesParser != null ) { argsList . add ( "-TOKEN_MANAGER_USES_PARSER=" + this . tokenManagerUsesParser ) ; } if ( StringUtils . isNotEmpty ( this . tokenExtends ) ) { argsList . add ( "-TOKEN_EXTENDS=" + this . tokenExtends ) ; } if ( StringUtils . isNotEmpty ( this . tokenFactory ) ) { argsList . add ( "-TOKEN_FACTORY=" + this . tokenFactory ) ; } if ( this . sanityCheck != null ) { argsList . add ( "-SANITY_CHECK=" + this . sanityCheck ) ; } if ( this . forceLaCheck != null ) { argsList . add ( "-FORCE_LA_CHECK=" + this . forceLaCheck ) ; } if ( this . cacheTokens != null ) { argsList . add ( "-CACHE_TOKENS=" + this . cacheTokens ) ; } if ( this . keepLineColumn != null ) { argsList . add ( "-KEEP_LINE_COLUMN=" + this . keepLineColumn ) ; } if ( this . supportClassVisibilityPublic != null ) { argsList . add ( "-SUPPORT_CLASS_VISIBILITY_PUBLIC=" + this . supportClassVisibilityPublic ) ; } if ( this . outputDirectory != null ) { argsList . add ( "-OUTPUT_DIRECTORY=" + this . outputDirectory . getAbsolutePath ( ) ) ; } if ( StringUtils . isNotEmpty ( this . javaTemplateType ) ) { argsList . add ( "-JAVA_TEMPLATE_TYPE=" + this . javaTemplateType ) ; } if ( this . inputFile != null ) { argsList . add ( this . inputFile . getAbsolutePath ( ) ) ; } return argsList . toArray ( new String [ argsList . size ( ) ] ) ; }
Assembles the command line arguments for the invocation of JavaCC according
to the configuration.<br/>
<br/>
<strong>Note:</strong> To prevent conflicts with JavaCC options that might
be set directly in the grammar file, only those parameters that have been
explicitly set are passed on the command line.

@return A string array that represents the command line arguments to use
for JavaCC.