jfun.yan
Class ReturnTypeMismatchException

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
                      extended by jfun.yan.ReturnTypeMismatchException
All Implemented Interfaces:
java.io.Serializable

public class ReturnTypeMismatchException
extends TypeMismatchException

Represents an error when a component's type does not match the return type of the factory method that it implements.

Zephyr Business Solution

Author:
Ben Yu
See Also:
Serialized Form

Constructor Summary
ReturnTypeMismatchException(java.lang.Class expected_type, java.lang.Class actual_type, java.lang.reflect.Method mtd)
          Create a ReturnTypeMismatchException object.
ReturnTypeMismatchException(java.lang.Class expected_type, java.lang.Class actual_type, java.lang.reflect.Method mtd, java.lang.String msg)
          Create a ReturnTypeMismatchException object.
 
Method Summary
 java.lang.reflect.Method getMethod()
          Get the problematic method.
 
Methods inherited from class jfun.yan.TypeMismatchException
getActualType, getExpectedType
 
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

ReturnTypeMismatchException

public ReturnTypeMismatchException(java.lang.Class expected_type,
                                   java.lang.Class actual_type,
                                   java.lang.reflect.Method mtd)
Create a ReturnTypeMismatchException object.

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

ReturnTypeMismatchException

public ReturnTypeMismatchException(java.lang.Class expected_type,
                                   java.lang.Class actual_type,
                                   java.lang.reflect.Method mtd,
                                   java.lang.String msg)
Create a ReturnTypeMismatchException object.

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

getMethod

public java.lang.reflect.Method getMethod()
Get the problematic method.

Returns:
the method.