jfun.yan
Class TypeMismatchException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by jfun.yan.YanException
                  extended by jfun.yan.TypeMismatchException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ParameterTypeMismatchException, PropertyTypeMismatchException, ReturnTypeMismatchException

public class TypeMismatchException
extends YanException

Represents any type mismatch exception.

Codehaus.org.

Author:
Ben Yu
See Also:
Serialized Form

Constructor Summary
TypeMismatchException(java.lang.Class expected_type, java.lang.Class actual_type)
          Create a TypeMismatchException object.
TypeMismatchException(java.lang.Class expected_type, java.lang.Class actual_type, java.lang.String msg)
          Create a TypeMismatchException object.
 
Method Summary
 java.lang.Class getActualType()
          Get the actual argument type.
 java.lang.Class getExpectedType()
          Get the expected type.
 
Methods inherited from class jfun.yan.YanException
clearResolutionTrace, getResolutionTrace, printResolutionTrace, printResolutionTrace, printResolutionTrace, printStackTrace, printStackTrace, push
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeMismatchException

public TypeMismatchException(java.lang.Class expected_type,
                             java.lang.Class actual_type)
Create a TypeMismatchException object.

Parameters:
expected_type - the expected type.
actual_type - the actual type.

TypeMismatchException

public TypeMismatchException(java.lang.Class expected_type,
                             java.lang.Class actual_type,
                             java.lang.String msg)
Create a TypeMismatchException object.

Parameters:
expected_type - the expected type.
actual_type - the actual type.
msg - the error message.
Method Detail

getActualType

public java.lang.Class getActualType()
Get the actual argument type.

Returns:
the actual argument type.

getExpectedType

public java.lang.Class getExpectedType()
Get the expected type.

Returns:
the expected type.