| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| IllegalOptionSpecificationException |
|
| 1.0;1 |
| 1 | /* | |
| 2 | Copyright 2004-2008 Paul R. Holser, Jr. All rights reserved. | |
| 3 | Licensed under the Academic Free License version 3.0 | |
| 4 | */ | |
| 5 | ||
| 6 | package joptsimple; | |
| 7 | ||
| 8 | import java.util.Collections; | |
| 9 | ||
| 10 | /** | |
| 11 | * <p>Thrown when the option parser is asked to recognize an option with illegal | |
| 12 | * characters in it.</p> | |
| 13 | * | |
| 14 | * @since 1.0 | |
| 15 | * @author <a href="mailto:pholser@alumni.rice.edu">Paul Holser</a> | |
| 16 | * @version $Id: IllegalOptionSpecificationException.java,v 1.4 2008/05/22 14:03:25 pholser Exp $ | |
| 17 | */ | |
| 18 | class IllegalOptionSpecificationException extends OptionException { | |
| 19 | private static final long serialVersionUID = -1L; | |
| 20 | ||
| 21 | IllegalOptionSpecificationException( String option ) { | |
| 22 | 10 | super( Collections.singletonList( option ) ); |
| 23 | 10 | } |
| 24 | ||
| 25 | /** | |
| 26 | * {@inheritDoc} | |
| 27 | */ | |
| 28 | public String getMessage() { | |
| 29 | 12 | return singleOptionMessage() + " is not a legal option character"; |
| 30 | } | |
| 31 | } |