public static boolean resultSubtype(final MethodInfo t, final MethodInfo s) { final TypeList tVars = t.getTypeArguments(); final TypeList sVars = s.getTypeArguments(); final Type tReturn = t.getReturnType(); final Type sReturn = substitute(s.getReturnType(), sVars, tVars); return covariantReturnType(tReturn, sReturn); }
public static boolean returnTypeSubstitutable(final MethodInfo r1, final MethodInfo r2) { if (hasSameArgs(r1, r2)) { return resultSubtype(r1, r2); } return covariantReturnType( r1.getReturnType(), erasure(r2.getReturnType()) ); }
public static boolean resultSubtype(final MethodInfo t, final MethodInfo s) { final TypeList tVars = t.getTypeArguments(); final TypeList sVars = s.getTypeArguments(); final Type tReturn = t.getReturnType(); final Type sReturn = substitute(s.getReturnType(), sVars, tVars); return covariantReturnType(tReturn, sReturn); }
public static boolean resultSubtype(final MethodInfo t, final MethodInfo s) { final TypeList tVars = t.getTypeArguments(); final TypeList sVars = s.getTypeArguments(); final Type tReturn = t.getReturnType(); final Type sReturn = substitute(s.getReturnType(), sVars, tVars); return covariantReturnType(tReturn, sReturn); }
public static boolean returnTypeSubstitutable(final MethodInfo r1, final MethodInfo r2) { if (hasSameArgs(r1, r2)) { return resultSubtype(r1, r2); } return covariantReturnType( r1.getReturnType(), erasure(r2.getReturnType()) ); }
public static boolean returnTypeSubstitutable(final MethodInfo r1, final MethodInfo r2) { if (hasSameArgs(r1, r2)) { return resultSubtype(r1, r2); } return covariantReturnType( r1.getReturnType(), erasure(r2.getReturnType()) ); }