本文整理了Java中org.eclipse.jdt.internal.compiler.lookup.BlockScope.isBoxingCompatibleWith()
方法的一些代码示例,展示了BlockScope.isBoxingCompatibleWith()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BlockScope.isBoxingCompatibleWith()
方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.lookup.BlockScope
类名称:BlockScope
方法名:isBoxingCompatibleWith
暂无
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
public TypeBinding resolveTypeExpecting(BlockScope scope, TypeBinding expectedType) {
setExpectedType(expectedType); // needed in case of generic method invocation
TypeBinding expressionType = this.resolveType(scope);
if (expressionType == null) return null;
if (expressionType == expectedType) return expressionType;
if (!expressionType.isCompatibleWith(expectedType)) {
if (scope.isBoxingCompatibleWith(expressionType, expectedType)) {
computeConversion(scope, expectedType, expressionType);
} else {
scope.problemReporter().typeMismatchError(expressionType, expectedType, this, null);
return null;
}
}
return expressionType;
}
代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core
public TypeBinding resolveTypeExpecting(BlockScope scope, TypeBinding expectedType) {
setExpectedType(expectedType); // needed in case of generic method invocation
TypeBinding expressionType = this.resolveType(scope);
if (expressionType == null) return null;
if (expressionType == expectedType) return expressionType;
if (!expressionType.isCompatibleWith(expectedType)) {
if (scope.isBoxingCompatibleWith(expressionType, expectedType)) {
computeConversion(scope, expectedType, expressionType);
} else {
scope.problemReporter().typeMismatchError(expressionType, expectedType, this, null);
return null;
}
}
return expressionType;
}
/**
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
public TypeBinding resolveTypeExpecting(BlockScope scope, TypeBinding expectedType) {
setExpectedType(expectedType); // needed in case of generic method invocation
TypeBinding expressionType = this.resolveType(scope);
if (expressionType == null) return null;
if (expressionType == expectedType) return expressionType;
if (!expressionType.isCompatibleWith(expectedType)) {
if (scope.isBoxingCompatibleWith(expressionType, expectedType)) {
computeConversion(scope, expectedType, expressionType);
} else {
scope.problemReporter().typeMismatchError(expressionType, expectedType, this, null);
return null;
}
}
return expressionType;
}
/**
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
public TypeBinding resolveTypeExpecting(BlockScope scope, TypeBinding expectedType) {
setExpectedType(expectedType); // needed in case of generic method invocation
TypeBinding expressionType = this.resolveType(scope);
if (expressionType == null) return null;
if (TypeBinding.equalsEquals(expressionType, expectedType)) return expressionType;
if (!expressionType.isCompatibleWith(expectedType)) {
if (scope.isBoxingCompatibleWith(expressionType, expectedType)) {
computeConversion(scope, expectedType, expressionType);
} else {
scope.problemReporter().typeMismatchError(expressionType, expectedType, this, null);
return null;
}
}
return expressionType;
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
public TypeBinding resolveTypeExpecting(BlockScope scope, TypeBinding expectedType) {
setExpectedType(expectedType); // needed in case of generic method invocation
TypeBinding expressionType = this.resolveType(scope);
if (expressionType == null) return null;
if (TypeBinding.equalsEquals(expressionType, expectedType)) return expressionType;
if (!expressionType.isCompatibleWith(expectedType)) {
if (scope.isBoxingCompatibleWith(expressionType, expectedType)) {
computeConversion(scope, expectedType, expressionType);
} else {
scope.problemReporter().typeMismatchError(expressionType, expectedType, this, null);
return null;
}
}
return expressionType;
}
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
public TypeBinding resolveTypeExpecting(BlockScope scope, TypeBinding expectedType) {
setExpectedType(expectedType); // needed in case of generic method invocation
TypeBinding expressionType = this.resolveType(scope);
if (expressionType == null) return null;
if (TypeBinding.equalsEquals(expressionType, expectedType)) return expressionType;
if (!expressionType.isCompatibleWith(expectedType)) {
if (scope.isBoxingCompatibleWith(expressionType, expectedType)) {
computeConversion(scope, expectedType, expressionType);
} else {
scope.problemReporter().typeMismatchError(expressionType, expectedType, this, null);
return null;
}
}
return expressionType;
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
public TypeBinding resolveTypeExpecting(BlockScope scope, TypeBinding expectedType) {
setExpectedType(expectedType); // needed in case of generic method invocation
TypeBinding expressionType = this.resolveType(scope);
if (expressionType == null) return null;
if (TypeBinding.equalsEquals(expressionType, expectedType)) return expressionType;
if (!expressionType.isCompatibleWith(expectedType)) {
if (scope.isBoxingCompatibleWith(expressionType, expectedType)) {
computeConversion(scope, expectedType, expressionType);
} else {
scope.problemReporter().typeMismatchError(expressionType, expectedType, this, null);
return null;
}
}
return expressionType;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
public TypeBinding resolveTypeExpecting(BlockScope scope, TypeBinding expectedType) {
setExpectedType(expectedType); // needed in case of generic method invocation
TypeBinding expressionType = this.resolveType(scope);
if (expressionType == null) return null;
if (TypeBinding.equalsEquals(expressionType, expectedType)) return expressionType;
if (!expressionType.isCompatibleWith(expectedType)) {
if (scope.isBoxingCompatibleWith(expressionType, expectedType)) {
computeConversion(scope, expectedType, expressionType);
} else {
scope.problemReporter().typeMismatchError(expressionType, expectedType, this, null);
return null;
}
}
return expressionType;
}
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
public TypeBinding resolveTypeExpecting(BlockScope scope, TypeBinding expectedType) {
setExpectedType(expectedType); // needed in case of generic method invocation
TypeBinding expressionType = this.resolveType(scope);
if (expressionType == null) return null;
if (TypeBinding.equalsEquals(expressionType, expectedType)) return expressionType;
if (!expressionType.isCompatibleWith(expectedType)) {
if (scope.isBoxingCompatibleWith(expressionType, expectedType)) {
computeConversion(scope, expectedType, expressionType);
} else {
scope.problemReporter().typeMismatchError(expressionType, expectedType, this, null);
return null;
}
}
return expressionType;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
public TypeBinding resolveTypeExpecting(BlockScope scope, TypeBinding expectedType) {
setExpectedType(expectedType); // needed in case of generic method invocation
TypeBinding expressionType = this.resolveType(scope);
if (expressionType == null) return null;
if (TypeBinding.equalsEquals(expressionType, expectedType)) return expressionType;
if (!expressionType.isCompatibleWith(expectedType)) {
if (scope.isBoxingCompatibleWith(expressionType, expectedType)) {
computeConversion(scope, expectedType, expressionType);
} else {
scope.problemReporter().typeMismatchError(expressionType, expectedType, this, null);
return null;
}
}
return expressionType;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
public TypeBinding resolveTypeExpecting(BlockScope scope, TypeBinding expectedType) {
setExpectedType(expectedType); // needed in case of generic method invocation
TypeBinding expressionType = this.resolveType(scope);
if (expressionType == null) return null;
if (TypeBinding.equalsEquals(expressionType, expectedType)) return expressionType;
if (!expressionType.isCompatibleWith(expectedType)) {
if (scope.isBoxingCompatibleWith(expressionType, expectedType)) {
computeConversion(scope, expectedType, expressionType);
} else {
scope.problemReporter().typeMismatchError(expressionType, expectedType, this, null);
return null;
}
}
return expressionType;
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
} else if (upperScope.isBoxingCompatibleWith(expressionType, TypeBinding.INT)) {
this.expression.computeConversion(upperScope, TypeBinding.INT, expressionType);
break checkType;
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
} else if (upperScope.isBoxingCompatibleWith(expressionType, TypeBinding.INT)) {
this.expression.computeConversion(upperScope, TypeBinding.INT, expressionType);
break checkType;
代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core
} else if (upperScope.isBoxingCompatibleWith(expressionType, TypeBinding.INT)) {
this.expression.computeConversion(upperScope, TypeBinding.INT, expressionType);
break checkType;
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
} else if (upperScope.isBoxingCompatibleWith(expressionType, TypeBinding.INT)) {
this.expression.computeConversion(upperScope, TypeBinding.INT, expressionType);
break checkType;
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
isEnumSwitch = true;
break checkType;
} else if (upperScope.isBoxingCompatibleWith(expressionType, TypeBinding.INT)) {
this.expression.computeConversion(upperScope, TypeBinding.INT, expressionType);
break checkType;
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
isEnumSwitch = true;
break checkType;
} else if (upperScope.isBoxingCompatibleWith(expressionType, TypeBinding.INT)) {
this.expression.computeConversion(upperScope, TypeBinding.INT, expressionType);
break checkType;
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
this.collectionElementType = ((ArrayBinding) collectionType).elementsType();
if (!this.collectionElementType.isCompatibleWith(elementType)
&& !this.scope.isBoxingCompatibleWith(this.collectionElementType, elementType)) {
this.scope.problemReporter().notCompatibleTypesErrorInForeach(this.collection, this.collectionElementType, elementType);
this.collectionElementType = this.scope.getJavaLangObject();
if (!this.collectionElementType.isCompatibleWith(elementType)
&& !this.scope.isBoxingCompatibleWith(this.collectionElementType, elementType)) {
this.scope.problemReporter().notCompatibleTypesErrorInForeach(this.collection, this.collectionElementType, elementType);
&& !this.scope.isBoxingCompatibleWith(this.collectionElementType, elementType)) {
this.scope.problemReporter().notCompatibleTypesErrorInForeach(this.collection, this.collectionElementType, elementType);
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
this.collectionElementType = ((ArrayBinding) collectionType).elementsType();
if (!this.collectionElementType.isCompatibleWith(elementType)
&& !this.scope.isBoxingCompatibleWith(this.collectionElementType, elementType)) {
this.scope.problemReporter().notCompatibleTypesErrorInForeach(this.collection, this.collectionElementType, elementType);
} else if (this.collectionElementType.needsUncheckedConversion(elementType)) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=321085
this.collectionElementType = this.scope.getJavaLangObject();
if (!this.collectionElementType.isCompatibleWith(elementType)
&& !this.scope.isBoxingCompatibleWith(this.collectionElementType, elementType)) {
this.scope.problemReporter().notCompatibleTypesErrorInForeach(this.collection, this.collectionElementType, elementType);
&& !this.scope.isBoxingCompatibleWith(this.collectionElementType, elementType)) {
this.scope.problemReporter().notCompatibleTypesErrorInForeach(this.collection, this.collectionElementType, elementType);
} else if (this.collectionElementType.needsUncheckedConversion(elementType)) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=393719
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
this.collectionElementType = ((ArrayBinding) collectionType).elementsType();
if (!this.collectionElementType.isCompatibleWith(elementType)
&& !this.scope.isBoxingCompatibleWith(this.collectionElementType, elementType)) {
this.scope.problemReporter().notCompatibleTypesErrorInForeach(this.collection, this.collectionElementType, elementType);
} else if (this.collectionElementType.needsUncheckedConversion(elementType)) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=321085
this.collectionElementType = this.scope.getJavaLangObject();
if (!this.collectionElementType.isCompatibleWith(elementType)
&& !this.scope.isBoxingCompatibleWith(this.collectionElementType, elementType)) {
this.scope.problemReporter().notCompatibleTypesErrorInForeach(this.collection, this.collectionElementType, elementType);
&& !this.scope.isBoxingCompatibleWith(this.collectionElementType, elementType)) {
this.scope.problemReporter().notCompatibleTypesErrorInForeach(this.collection, this.collectionElementType, elementType);
} else if (this.collectionElementType.needsUncheckedConversion(elementType)) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=393719
内容来源于网络,如有侵权,请联系作者删除!