public function getUsageMessage()
    {
        if (empty($this->scriptName)) {
            throw new GetoptException('Script name can not be empty');
        }
        $helpText = 'Usage: ' . $this->scriptName . ' '
            . $this->argumentsDescription . "\n\n" . 'Options:' ."\n"
        ;
        $args = array();
        $charCount = 0;
        foreach ($this->optionDefinitions as $option) {
            $arg = $this->getOptionString($option);
            $charCount = $charCount < strlen($arg) ? strlen($arg) : $charCount;
            $args[$arg] = $option->getDescription();
        }
        foreach ($args as $arg => $description) {
            $helpText .= str_pad($arg, $charCount + 1) . $description . "\n";
        }
        return $helpText;
    }