1 8 9 15 package jfun.yan; 16 17 import java.lang.reflect.Method ; 18 19 import jfun.util.Misc; 20 21 30 public class ReturnTypeMismatchException extends TypeMismatchException { 31 private final Method mtd; 32 33 34 40 public ReturnTypeMismatchException(Class expected_type, Class actual_type, 41 final Method mtd) { 42 super(expected_type, actual_type, 43 "" + Misc.getTypeName(actual_type) 44 + " cannot match return type of <" 45 + mtd + ">"); 46 this.mtd = mtd; 47 } 48 55 public ReturnTypeMismatchException( 56 final Class expected_type, final Class actual_type, 57 final Method mtd, final String msg){ 58 super(expected_type, actual_type, msg); 59 this.mtd = mtd; 60 } 61 65 public Method getMethod() { 66 return mtd; 67 } 68 } 69 | Popular Tags |