gnu.mapping
Class WrongType

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by gnu.mapping.WrappedException
                  extended by gnu.mapping.WrongType
All Implemented Interfaces:
java.io.Serializable

public class WrongType
extends WrappedException

Exception thrown when a procedure parameter has the wrong type.

See Also:
Serialized Form

Field Summary
static int ARG_CAST
          number==ARG_CAST means a general cast.
static int ARG_DESCRIPTION
          number==ARG_DESCRIPTION means not a call, procname describes the target.
static int ARG_UNKNOWN
          number==ARG_UNKNOWN means unknown argument number.
static int ARG_VARNAME
          number==ARG_VARNAME means not a call, procname is a variable name.
 java.lang.Object argValue
          The actual argument that was bad.
 java.lang.Object expectedType
          The expected parameter type (a Type or TypeValue), or a string name/description.
 int number
          Number of the argument, 1-origin.
 Procedure proc
          The Procedure that threw the exception (if non-null).
 java.lang.String procname
          Name of Procedure that threw the exception (if non-null).
 
Constructor Summary
WrongType(java.lang.ClassCastException ex, Procedure proc, int n, java.lang.Object argValue)
           
WrongType(java.lang.ClassCastException ex, java.lang.String procname, int n, java.lang.Object argValue)
           
WrongType(int n, java.lang.Object argValue, Type expectedType)
           
WrongType(Procedure proc, int n, java.lang.ClassCastException ex)
           
WrongType(Procedure proc, int n, java.lang.Object argValue)
           
WrongType(Procedure proc, int n, java.lang.Object argValue, java.lang.String expectedType)
           
WrongType(Procedure proc, int n, java.lang.Object argValue, Type expectedType)
           
WrongType(java.lang.String procname, int n, java.lang.ClassCastException ex)
           
WrongType(java.lang.String procName, int n, java.lang.Object argValue, java.lang.String expectedType)
           
WrongType(java.lang.String name, int n, java.lang.String u)
           
 
Method Summary
 java.lang.String getMessage()
           
static WrongType make(java.lang.ClassCastException ex, Procedure proc, int n)
          Deprecated.  
static WrongType make(java.lang.ClassCastException ex, Procedure proc, int n, java.lang.Object argValue)
          This interface is designed for a compact call sequence.
static WrongType make(java.lang.ClassCastException ex, java.lang.String procname, int n)
          Deprecated.  
static WrongType make(java.lang.ClassCastException ex, java.lang.String procname, int n, java.lang.Object argValue)
          This interface is designed for a compact call sequence.
 
Methods inherited from class gnu.mapping.WrappedException
getException, toString, wrapIfNeeded
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

number

public int number
Number of the argument, 1-origin.
Can be an integer >= 1, or one of the values ARG_UNKNOWN, ARG_VARNAME, or ARG_DESCRIPTION.


ARG_UNKNOWN

public static final int ARG_UNKNOWN
number==ARG_UNKNOWN means unknown argument number.

See Also:
Constant Field Values

ARG_VARNAME

public static final int ARG_VARNAME
number==ARG_VARNAME means not a call, procname is a variable name.

See Also:
Constant Field Values

ARG_DESCRIPTION

public static final int ARG_DESCRIPTION
number==ARG_DESCRIPTION means not a call, procname describes the target. (deprecated/unused)

See Also:
Constant Field Values

ARG_CAST

public static final int ARG_CAST
number==ARG_CAST means a general cast.

See Also:
Constant Field Values

procname

public java.lang.String procname
Name of Procedure that threw the exception (if non-null).


proc

public Procedure proc
The Procedure that threw the exception (if non-null).


argValue

public java.lang.Object argValue
The actual argument that was bad.


expectedType

public java.lang.Object expectedType
The expected parameter type (a Type or TypeValue), or a string name/description.

Constructor Detail

WrongType

public WrongType(java.lang.String name,
                 int n,
                 java.lang.String u)

WrongType

public WrongType(Procedure proc,
                 int n,
                 java.lang.ClassCastException ex)

WrongType

public WrongType(java.lang.ClassCastException ex,
                 Procedure proc,
                 int n,
                 java.lang.Object argValue)

WrongType

public WrongType(Procedure proc,
                 int n,
                 java.lang.Object argValue)

WrongType

public WrongType(Procedure proc,
                 int n,
                 java.lang.Object argValue,
                 Type expectedType)

WrongType

public WrongType(int n,
                 java.lang.Object argValue,
                 Type expectedType)

WrongType

public WrongType(Procedure proc,
                 int n,
                 java.lang.Object argValue,
                 java.lang.String expectedType)

WrongType

public WrongType(java.lang.String procName,
                 int n,
                 java.lang.Object argValue,
                 java.lang.String expectedType)

WrongType

public WrongType(java.lang.String procname,
                 int n,
                 java.lang.ClassCastException ex)

WrongType

public WrongType(java.lang.ClassCastException ex,
                 java.lang.String procname,
                 int n,
                 java.lang.Object argValue)
Method Detail

make

public static WrongType make(java.lang.ClassCastException ex,
                             Procedure proc,
                             int n)
Deprecated. 


make

public static WrongType make(java.lang.ClassCastException ex,
                             java.lang.String procname,
                             int n)
Deprecated. 


make

public static WrongType make(java.lang.ClassCastException ex,
                             Procedure proc,
                             int n,
                             java.lang.Object argValue)
This interface is designed for a compact call sequence.


make

public static WrongType make(java.lang.ClassCastException ex,
                             java.lang.String procname,
                             int n,
                             java.lang.Object argValue)
This interface is designed for a compact call sequence.


getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable