| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| IllegalOptionClusterException |
|
| 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 discovers a cluster of short options in which | |
| 12 | * at least one of the short options can accept arguments.</p> | |
| 13 | * | |
| 14 | * @since 1.0 | |
| 15 | * @author <a href="mailto:pholser@alumni.rice.edu">Paul Holser</a> | |
| 16 | * @version $Id: IllegalOptionClusterException.java,v 1.4 2008/05/22 14:03:24 pholser Exp $ | |
| 17 | */ | |
| 18 | class IllegalOptionClusterException extends OptionException { | |
| 19 | private static final long serialVersionUID = -1L; | |
| 20 | ||
| 21 | IllegalOptionClusterException( String option ) { | |
| 22 | 4 | super( Collections.singletonList( option ) ); |
| 23 | 4 | } |
| 24 | ||
| 25 | /** | |
| 26 | * {@inheritDoc} | |
| 27 | */ | |
| 28 | public String getMessage() { | |
| 29 | 6 | return "Option cluster containing " + singleOptionMessage() + " is illegal"; |
| 30 | } | |
| 31 | } |