parameters: (self, start_line=0)
docstring: Parse Java style flags (com.google.common.flags).
docstring_summary: Parse Java style flags (com.google.common.flags).
docstring_tokens: Parse Java style flags ( com . google . common . flags ) .
function: def ParseJavaFlags(self, start_line=0):
      """Parse Java style flags (com.google.common.flags)."""
      # The java flags prints starts with a "Standard flags" "module"
      # that doesn't follow the standard module syntax.
      modname = 'Standard flags'          # name of current module
      self.module_list.append(modname)
      self.modules.setdefault(modname, [])
      modlist = self.modules[modname]
      flag = None
  
      for line_num in range(start_line, len(self.output)): # collect flags
        line = self.output[line_num].rstrip()
        logging.vlog(2, 'Line: "%s"' % line)
        if not line:                      # blank lines terminate module
          if flag:                        # save last flag
            modlist.append(flag)
            flag = None
          continue
  
        mobj = self.module_java_re.match(line)
        if mobj:                          # start of a new module
          modname = mobj.group(1)
          logging.debug('Module: %s' % line)
          if flag:
            modlist.append(flag)
          self.module_list.append(modname)
          self.modules.setdefault(modname, [])
          modlist = self.modules[modname]
          flag = None
          continue
  
        mobj = self.flag_java_re.match(line)
        if mobj:                          # start of a new flag
          if flag:                        # save last flag
            modlist.append(flag)
          logging.debug('Flag: %s' % line)
          flag = Flag(mobj.group(1),  mobj.group(2))
          continue
  
        # append to flag help.  type and default are part of the main text
        if flag:
          flag.help += ' ' + line.strip()
        else:
          logging.info('Extra: %s' % line)
      if flag:
        modlist.append(flag)
function_tokens: def ParseJavaFlags ( self , start_line = 0 ) : # The java flags prints starts with a "Standard flags" "module" # that doesn't follow the standard module syntax. modname = 'Standard flags' # name of current module self . module_list . append ( modname ) self . modules . setdefault ( modname , [ ] ) modlist = self . modules [ modname ] flag = None for line_num in range ( start_line , len ( self . output ) ) : # collect flags line = self . output [ line_num ] . rstrip ( ) logging . vlog ( 2 , 'Line: "%s"' % line ) if not line : # blank lines terminate module if flag : # save last flag modlist . append ( flag ) flag = None continue mobj = self . module_java_re . match ( line ) if mobj : # start of a new module modname = mobj . group ( 1 ) logging . debug ( 'Module: %s' % line ) if flag : modlist . append ( flag ) self . module_list . append ( modname ) self . modules . setdefault ( modname , [ ] ) modlist = self . modules [ modname ] flag = None continue mobj = self . flag_java_re . match ( line ) if mobj : # start of a new flag if flag : # save last flag modlist . append ( flag ) logging . debug ( 'Flag: %s' % line ) flag = Flag ( mobj . group ( 1 ) , mobj . group ( 2 ) ) continue # append to flag help.  type and default are part of the main text if flag : flag . help += ' ' + line . strip ( ) else : logging . info ( 'Extra: %s' % line ) if flag : modlist . append ( flag )