@Override public Void visitArrayType(final Type source, final Type target) throws AdaptFailure { adaptRecursive(elementType(source), elementType(target)); return null; }
@Override public Void visitArrayType(final Type source, final Type target) throws AdaptFailure { adaptRecursive(elementType(source), elementType(target)); return null; }
@Override public Void visitArrayType(final Type source, final Type target) throws AdaptFailure { adaptRecursive(elementType(source), elementType(target)); return null; }
@Override public Boolean visitArrayType(final Type t, final Type s) { final Type elementType = t.getElementType(); if (elementType.isPrimitive()) { return isSameType(elementType, elementType(s)); } return isSubtypeNoCapture(elementType, elementType(s)); } };
@Override public Boolean visitArrayType(final Type t, final Type s) { final Type elementType = t.getElementType(); if (elementType.isPrimitive()) { return isSameType(elementType, elementType(s)); } return isSubtypeNoCapture(elementType, elementType(s)); } };
@Override public Boolean visitArrayType(final Type t, final Type s) { final Type elementType = t.getElementType(); if (elementType.isPrimitive()) { return isSameType(elementType, elementType(s)); } return isSubtypeNoCapture(elementType, elementType(s)); } };
public static Type elementType(final Type t) { if (t.isArray()) { return t.getElementType(); } if (t.isWildcardType()) { return elementType(upperBound(t)); } return null; }
public static Type elementType(final Type t) { if (t.isArray()) { return t.getElementType(); } if (t.isWildcardType()) { return elementType(upperBound(t)); } return null; }
public static Type elementType(final Type t) { if (t.isArray()) { return t.getElementType(); } if (t.isWildcardType()) { return elementType(upperBound(t)); } return null; }
public static boolean isSubtypeUnchecked(final Type t, final Type s) { if (t.isArray() && s.isArray()) { if (t.getElementType().isPrimitive()) { return isSameType(elementType(t), elementType(s)); } return isSubtypeUnchecked(elementType(t), elementType(s)); } else if (isSubtype(t, s)) { return true; } else if (t.isGenericParameter()) { return isSubtypeUnchecked(t.getExtendsBound(), s); } else if (s.isGenericParameter()) { return isSubtypeUnchecked(t, s.getExtendsBound()); } else if (s.isGenericType() && !s.isGenericTypeDefinition()) { final Type t2 = asSuper(t, s); if (t2 != null) { return true; } } return false; }
public static boolean isSubtypeUnchecked(final Type t, final Type s) { if (t.isArray() && s.isArray()) { if (t.getElementType().isPrimitive()) { return isSameType(elementType(t), elementType(s)); } return isSubtypeUnchecked(elementType(t), elementType(s)); } else if (isSubtype(t, s)) { return true; } else if (t.isGenericParameter()) { return isSubtypeUnchecked(t.getExtendsBound(), s); } else if (s.isGenericParameter()) { return isSubtypeUnchecked(t, s.getExtendsBound()); } else if (s.isGenericType() && !s.isGenericTypeDefinition()) { final Type t2 = asSuper(t, s); if (t2 != null) { return true; } } return false; }
public static boolean isSubtypeUnchecked(final Type t, final Type s) { if (t.isArray() && s.isArray()) { if (t.getElementType().isPrimitive()) { return isSameType(elementType(t), elementType(s)); } return isSubtypeUnchecked(elementType(t), elementType(s)); } else if (isSubtype(t, s)) { return true; } else if (t.isGenericParameter()) { return isSubtypeUnchecked(t.getExtendsBound(), s); } else if (s.isGenericParameter()) { return isSubtypeUnchecked(t, s.getExtendsBound()); } else if (s.isGenericType() && !s.isGenericTypeDefinition()) { final Type t2 = asSuper(t, s); if (t2 != null) { return true; } } return false; }