List of usage examples for org.eclipse.jdt.internal.compiler.lookup TypeBinding isCompatibleWith
public abstract boolean isCompatibleWith(TypeBinding right, Scope scope);
From source file:org.eclipse.objectteams.otdt.internal.core.compiler.lifting.ArrayLowering.java
License:Open Source License
public MethodBinding ensureTransformMethod(BlockScope scope, Expression teamExpr, TypeBinding providedType, TypeBinding requiredType, boolean isLifting) { TypeBinding providedLeaf = providedType.leafComponentType(); TypeBinding matchingBase = ((ReferenceBinding) providedLeaf).baseclass(); TypeBinding requiredLeaf = requiredType.leafComponentType(); if (TypeBinding.notEquals(matchingBase, requiredLeaf) && matchingBase.isCompatibleWith(requiredLeaf, scope)) { requiredType = scope.environment().createArrayType(matchingBase, requiredType.dimensions()); }//from ww w .j a v a 2s .c om return super.ensureTransformMethod(scope, teamExpr, providedType, requiredType, isLifting); }