equal
deleted
inserted
replaced
2731 /** |
2731 /** |
2732 * Returns true iff the first signature is a <em>sub |
2732 * Returns true iff the first signature is a <em>sub |
2733 * signature</em> of the other. This is <b>not</b> an equivalence |
2733 * signature</em> of the other. This is <b>not</b> an equivalence |
2734 * relation. |
2734 * relation. |
2735 * |
2735 * |
2736 * @jls section 8.4.2. |
2736 * @jls 8.4.2 Method Signature |
2737 * @see #overrideEquivalent(Type t, Type s) |
2737 * @see #overrideEquivalent(Type t, Type s) |
2738 * @param t first signature (possibly raw). |
2738 * @param t first signature (possibly raw). |
2739 * @param s second signature (could be subjected to erasure). |
2739 * @param s second signature (could be subjected to erasure). |
2740 * @return true if t is a sub signature of s. |
2740 * @return true if t is a sub signature of s. |
2741 */ |
2741 */ |
2750 /** |
2750 /** |
2751 * Returns true iff these signatures are related by <em>override |
2751 * Returns true iff these signatures are related by <em>override |
2752 * equivalence</em>. This is the natural extension of |
2752 * equivalence</em>. This is the natural extension of |
2753 * isSubSignature to an equivalence relation. |
2753 * isSubSignature to an equivalence relation. |
2754 * |
2754 * |
2755 * @jls section 8.4.2. |
2755 * @jls 8.4.2 Method Signature |
2756 * @see #isSubSignature(Type t, Type s) |
2756 * @see #isSubSignature(Type t, Type s) |
2757 * @param t a signature (possible raw, could be subjected to |
2757 * @param t a signature (possible raw, could be subjected to |
2758 * erasure). |
2758 * erasure). |
2759 * @param s a signature (possible raw, could be subjected to |
2759 * @param s a signature (possible raw, could be subjected to |
2760 * erasure). |
2760 * erasure). |
4212 return covariantReturnType(tres, sres, warner); |
4212 return covariantReturnType(tres, sres, warner); |
4213 } |
4213 } |
4214 |
4214 |
4215 /** |
4215 /** |
4216 * Return-Type-Substitutable. |
4216 * Return-Type-Substitutable. |
4217 * @jls section 8.4.5 |
4217 * @jls 8.4.5 Method Result |
4218 */ |
4218 */ |
4219 public boolean returnTypeSubstitutable(Type r1, Type r2) { |
4219 public boolean returnTypeSubstitutable(Type r1, Type r2) { |
4220 if (hasSameArgs(r1, r2)) |
4220 if (hasSameArgs(r1, r2)) |
4221 return resultSubtype(r1, r2, noWarnings); |
4221 return resultSubtype(r1, r2, noWarnings); |
4222 else |
4222 else |