SoftNet-Consult Java Utility Library

com.softnetConsult.utils.exceptions
Class UnexpectedSwitchCase

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Error
          extended by com.softnetConsult.utils.exceptions.Bug
              extended by com.softnetConsult.utils.exceptions.UnexpectedSwitchCase
All Implemented Interfaces:
java.io.Serializable

public class UnexpectedSwitchCase
extends Bug

A Throwable Bug (Error) that should be thrown to report that an unexpected case within a switch statement cas been encountered. This class exists to faciliate brievity and expressiveness of the source code.

This product includes software developed by the SoftNet-Consult Java Utility Library project and its contributors.
(http://java-tools.sourceforge.net)
Copyright (c) 2007-2008 SoftNet-Consult.
Copyright (c) 2007-2008 G. Paperin.
All rights reserved.

File: UnexpectedSwitchCase.java
Library API version: "2.02"
Java compliance version: "1.5"

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following terms and conditions are met:

1. Redistributions of source code must retain the above acknowledgement of the SoftNet-Consult Java Utility Library project, the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above acknowledgement of the SoftNet-Consult Java Utility Library project, the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software or any derived software must display the following acknowledgement:
This product includes software developed by the SoftNet-Consult Java Utility Library project and its contributors.

THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Version:
"2.02"
Author:
Greg Paperin (http://www.paperin.org)
See Also:
Serialized Form

Constructor Summary
UnexpectedSwitchCase(byte caseConstant)
          Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of type byte.
UnexpectedSwitchCase(java.lang.Byte caseConstant)
          Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of type Byte.
UnexpectedSwitchCase(char caseConstant)
          Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of type char.
UnexpectedSwitchCase(java.lang.Character caseConstant)
          Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of type Character.
UnexpectedSwitchCase(E caseConstant)
          Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of an Enum-type E.
UnexpectedSwitchCase(int caseConstant)
          Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of type int.
UnexpectedSwitchCase(java.lang.Integer caseConstant)
          Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of type Integer.
UnexpectedSwitchCase(short caseConstant)
          Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of type short.
UnexpectedSwitchCase(java.lang.Short caseConstant)
          Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of type Short.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnexpectedSwitchCase

public UnexpectedSwitchCase(byte caseConstant)
Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of type byte.

Parameters:
caseConstant - The unexpected switch case that was encountered.

UnexpectedSwitchCase

public UnexpectedSwitchCase(char caseConstant)
Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of type char.

Parameters:
caseConstant - The unexpected switch case that was encountered.

UnexpectedSwitchCase

public UnexpectedSwitchCase(short caseConstant)
Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of type short.

Parameters:
caseConstant - The unexpected switch case that was encountered.

UnexpectedSwitchCase

public UnexpectedSwitchCase(int caseConstant)
Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of type int.

Parameters:
caseConstant - The unexpected switch case that was encountered.

UnexpectedSwitchCase

public UnexpectedSwitchCase(java.lang.Byte caseConstant)
Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of type Byte.

Parameters:
caseConstant - The unexpected switch case that was encountered.

UnexpectedSwitchCase

public UnexpectedSwitchCase(java.lang.Character caseConstant)
Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of type Character.

Parameters:
caseConstant - The unexpected switch case that was encountered.

UnexpectedSwitchCase

public UnexpectedSwitchCase(java.lang.Short caseConstant)
Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of type Short.

Parameters:
caseConstant - The unexpected switch case that was encountered.

UnexpectedSwitchCase

public UnexpectedSwitchCase(java.lang.Integer caseConstant)
Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of type Integer.

Parameters:
caseConstant - The unexpected switch case that was encountered.

UnexpectedSwitchCase

public UnexpectedSwitchCase(E caseConstant)
Constructs a new UnexpectedSwitchCase-Bug that indicates that an unexpected case was encountered within a switch statement that forks on a variable of an Enum-type E.

Type Parameters:
E - The Enum-type of the variable on which the concerned switch statement was forked.
Parameters:
caseConstant - The unexpected switch case that was encountered.

SoftNet-Consult Java Utility Library is a member of SourceForge.net