/** * Answer <code>true</code> if the receiver of this method can be assigned * to the argument lhs (e.g lhs= this is a valid assignment). * * @param lhs the left hand side of the assignment * @return whether or not this type can be assigned to lhs */ public final boolean canAssignTo(TType lhs) { if (this.isTypeEquivalentTo(lhs)) return true; return doCanAssignTo(lhs); }
/** * Answer <code>true</code> if the receiver of this method can be assigned * to the argument lhs (e.g lhs= this is a valid assignment). * * @param lhs the left hand side of the assignment * @return whether or not this type can be assigned to lhs */ public final boolean canAssignTo(TType lhs) { if (this.isTypeEquivalentTo(lhs)) return true; return doCanAssignTo(lhs); }
/** * Answer <code>true</code> if the receiver of this method can be assigned * to the argument lhs (e.g lhs= this is a valid assignment). * * @param lhs the left hand side of the assignment * @return whether or not this type can be assigned to lhs */ public final boolean canAssignTo(TType lhs) { if (this.isTypeEquivalentTo(lhs)) return true; return doCanAssignTo(lhs); }
@Override protected boolean isTypeEquivalentTo(TType other) { int otherElementType= other.getKind(); if (otherElementType == RAW_TYPE || otherElementType == GENERIC_TYPE) return getErasure().isTypeEquivalentTo(other.getErasure()); return super.isTypeEquivalentTo(other); }
private boolean canAssignToArrayType(ArrayType lhs) { if (fDimensions == lhs.fDimensions) { // primitive type don't have any conversion for arrays. if (fElementType.getKind() == PRIMITIVE_TYPE || lhs.fElementType.getKind() == PRIMITIVE_TYPE) return fElementType.isTypeEquivalentTo(lhs.fElementType); return fElementType.canAssignTo(lhs.fElementType); } if (fDimensions < lhs.fDimensions) return false; return isArrayLhsCompatible(lhs.fElementType); }
@Override protected boolean isTypeEquivalentTo(TType other) { int otherElementType= other.getKind(); if (otherElementType == RAW_TYPE || otherElementType == PARAMETERIZED_TYPE) return getErasure().isTypeEquivalentTo(other.getErasure()); return super.isTypeEquivalentTo(other); }
@Override protected boolean isTypeEquivalentTo(TType other) { int otherElementType= other.getKind(); if (otherElementType == RAW_TYPE || otherElementType == GENERIC_TYPE) return getErasure().isTypeEquivalentTo(other.getErasure()); return super.isTypeEquivalentTo(other); }
@Override protected boolean isTypeEquivalentTo(TType other) { int otherElementType= other.getKind(); if (otherElementType == PARAMETERIZED_TYPE || otherElementType == GENERIC_TYPE) return getErasure().isTypeEquivalentTo(other.getErasure()); return super.isTypeEquivalentTo(other); }
protected boolean isTypeEquivalentTo(TType other) { int otherElementType= other.getKind(); if (otherElementType == PARAMETERIZED_TYPE || otherElementType == GENERIC_TYPE) return getErasure().isTypeEquivalentTo(other.getErasure()); return super.isTypeEquivalentTo(other); }
protected boolean isTypeEquivalentTo(TType other) { int otherElementType= other.getKind(); if (otherElementType == RAW_TYPE || otherElementType == PARAMETERIZED_TYPE) return getErasure().isTypeEquivalentTo(other.getErasure()); return super.isTypeEquivalentTo(other); }
protected boolean isTypeEquivalentTo(TType other) { int otherElementType= other.getKind(); if (otherElementType == RAW_TYPE || otherElementType == GENERIC_TYPE) return getErasure().isTypeEquivalentTo(other.getErasure()); return super.isTypeEquivalentTo(other); }
private boolean canAssignToArrayType(ArrayType lhs) { if (fDimensions == lhs.fDimensions) { // primitive type don't have any conversion for arrays. if (fElementType.getKind() == PRIMITIVE_TYPE || lhs.fElementType.getKind() == PRIMITIVE_TYPE) return fElementType.isTypeEquivalentTo(lhs.fElementType); return fElementType.canAssignTo(lhs.fElementType); } if (fDimensions < lhs.fDimensions) return false; return isArrayLhsCompatible(lhs.fElementType); }
private boolean canAssignToArrayType(ArrayType lhs) { if (fDimensions == lhs.fDimensions) { // primitive type don't have any conversion for arrays. if (fElementType.getKind() == PRIMITIVE_TYPE || lhs.fElementType.getKind() == PRIMITIVE_TYPE) return fElementType.isTypeEquivalentTo(lhs.fElementType); return fElementType.canAssignTo(lhs.fElementType); } if (fDimensions < lhs.fDimensions) return false; return isArrayLhsCompatible(lhs.fElementType); }
@Override protected boolean isTypeEquivalentTo(TType other) { int otherElementType= other.getKind(); if (otherElementType == RAW_TYPE || otherElementType == PARAMETERIZED_TYPE) return getErasure().isTypeEquivalentTo(other.getErasure()); return super.isTypeEquivalentTo(other); }
@Override protected boolean isTypeEquivalentTo(TType other) { int otherElementType= other.getKind(); if (otherElementType == PARAMETERIZED_TYPE || otherElementType == GENERIC_TYPE) return getErasure().isTypeEquivalentTo(other.getErasure()); return super.isTypeEquivalentTo(other); }