本文整理了Java中org.eclipse.jdt.internal.compiler.lookup.BlockScope.getMethod()
方法的一些代码示例,展示了BlockScope.getMethod()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BlockScope.getMethod()
方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.lookup.BlockScope
类名称:BlockScope
方法名:getMethod
暂无
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
/** 15.12.3 (Java 8) "Compile-Time Step 3: Is the Chosen Method Appropriate?" */
public void checkAppropriateMethodAgainstSupers(char[] selector, MethodBinding compileTimeMethod,
TypeBinding[] parameters, InvocationSite site)
{
ReferenceBinding enclosingType = enclosingReceiverType();
MethodBinding otherMethod = getMethod(enclosingType.superclass(), selector, parameters, site);
if (checkAppropriate(compileTimeMethod, otherMethod, site)) {
ReferenceBinding[] superInterfaces = enclosingType.superInterfaces();
if (superInterfaces != null) {
for (int i = 0; i < superInterfaces.length; i++) {
otherMethod = getMethod(superInterfaces[i], selector, parameters, site);
if (!checkAppropriate(compileTimeMethod, otherMethod, site))
break;
}
}
}
}
private boolean checkAppropriate(MethodBinding compileTimeDeclaration, MethodBinding otherMethod, InvocationSite location) {
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
/** 15.12.3 (Java 8) "Compile-Time Step 3: Is the Chosen Method Appropriate?" */
public void checkAppropriateMethodAgainstSupers(char[] selector, MethodBinding compileTimeMethod,
TypeBinding[] parameters, InvocationSite site)
{
ReferenceBinding enclosingType = enclosingReceiverType();
MethodBinding otherMethod = getMethod(enclosingType.superclass(), selector, parameters, site);
if (checkAppropriate(compileTimeMethod, otherMethod, site)) {
ReferenceBinding[] superInterfaces = enclosingType.superInterfaces();
if (superInterfaces != null) {
for (int i = 0; i < superInterfaces.length; i++) {
otherMethod = getMethod(superInterfaces[i], selector, parameters, site);
if (!checkAppropriate(compileTimeMethod, otherMethod, site))
break;
}
}
}
}
private boolean checkAppropriate(MethodBinding compileTimeDeclaration, MethodBinding otherMethod, InvocationSite location) {
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
/** 15.12.3 (Java 8) "Compile-Time Step 3: Is the Chosen Method Appropriate?" */
public void checkAppropriateMethodAgainstSupers(char[] selector, MethodBinding compileTimeMethod,
TypeBinding[] parameters, InvocationSite site)
{
ReferenceBinding enclosingType = enclosingReceiverType();
MethodBinding otherMethod = getMethod(enclosingType.superclass(), selector, parameters, site);
if (checkAppropriate(compileTimeMethod, otherMethod, site)) {
ReferenceBinding[] superInterfaces = enclosingType.superInterfaces();
if (superInterfaces != null) {
for (int i = 0; i < superInterfaces.length; i++) {
otherMethod = getMethod(superInterfaces[i], selector, parameters, site);
if (!checkAppropriate(compileTimeMethod, otherMethod, site))
break;
}
}
}
}
private boolean checkAppropriate(MethodBinding compileTimeDeclaration, MethodBinding otherMethod, InvocationSite location) {
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
/** 15.12.3 (Java 8) "Compile-Time Step 3: Is the Chosen Method Appropriate?" */
public void checkAppropriateMethodAgainstSupers(char[] selector, MethodBinding compileTimeMethod,
TypeBinding[] parameters, InvocationSite site)
{
ReferenceBinding enclosingType = enclosingReceiverType();
MethodBinding otherMethod = getMethod(enclosingType.superclass(), selector, parameters, site);
if (checkAppropriate(compileTimeMethod, otherMethod, site)) {
ReferenceBinding[] superInterfaces = enclosingType.superInterfaces();
if (superInterfaces != null) {
for (int i = 0; i < superInterfaces.length; i++) {
otherMethod = getMethod(superInterfaces[i], selector, parameters, site);
if (!checkAppropriate(compileTimeMethod, otherMethod, site))
break;
}
}
}
}
private boolean checkAppropriate(MethodBinding compileTimeDeclaration, MethodBinding otherMethod, InvocationSite location) {
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
/** 15.12.3 (Java 8) "Compile-Time Step 3: Is the Chosen Method Appropriate?" */
public void checkAppropriateMethodAgainstSupers(char[] selector, MethodBinding compileTimeMethod,
TypeBinding[] parameters, InvocationSite site)
{
ReferenceBinding enclosingType = enclosingReceiverType();
MethodBinding otherMethod = getMethod(enclosingType.superclass(), selector, parameters, site);
if (checkAppropriate(compileTimeMethod, otherMethod, site)) {
ReferenceBinding[] superInterfaces = enclosingType.superInterfaces();
if (superInterfaces != null) {
for (int i = 0; i < superInterfaces.length; i++) {
otherMethod = getMethod(superInterfaces[i], selector, parameters, site);
if (!checkAppropriate(compileTimeMethod, otherMethod, site))
break;
}
}
}
}
private boolean checkAppropriate(MethodBinding compileTimeDeclaration, MethodBinding otherMethod, InvocationSite location) {
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
/** 15.12.3 (Java 8) "Compile-Time Step 3: Is the Chosen Method Appropriate?" */
public void checkAppropriateMethodAgainstSupers(char[] selector, MethodBinding compileTimeMethod,
TypeBinding[] parameters, InvocationSite site)
{
ReferenceBinding enclosingType = enclosingReceiverType();
MethodBinding otherMethod = getMethod(enclosingType.superclass(), selector, parameters, site);
if (checkAppropriate(compileTimeMethod, otherMethod, site)) {
ReferenceBinding[] superInterfaces = enclosingType.superInterfaces();
if (superInterfaces != null) {
for (int i = 0; i < superInterfaces.length; i++) {
otherMethod = getMethod(superInterfaces[i], selector, parameters, site);
if (!checkAppropriate(compileTimeMethod, otherMethod, site))
break;
}
}
}
}
private boolean checkAppropriate(MethodBinding compileTimeDeclaration, MethodBinding otherMethod, InvocationSite location) {
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
/** 15.12.3 (Java 8) "Compile-Time Step 3: Is the Chosen Method Appropriate?" */
public void checkAppropriateMethodAgainstSupers(char[] selector, MethodBinding compileTimeMethod,
TypeBinding[] parameters, InvocationSite site)
{
ReferenceBinding enclosingType = enclosingReceiverType();
MethodBinding otherMethod = getMethod(enclosingType.superclass(), selector, parameters, site);
if (checkAppropriate(compileTimeMethod, otherMethod, site)) {
ReferenceBinding[] superInterfaces = enclosingType.superInterfaces();
if (superInterfaces != null) {
for (int i = 0; i < superInterfaces.length; i++) {
otherMethod = getMethod(superInterfaces[i], selector, parameters, site);
if (!checkAppropriate(compileTimeMethod, otherMethod, site))
break;
}
}
}
}
private boolean checkAppropriate(MethodBinding compileTimeDeclaration, MethodBinding otherMethod, InvocationSite location) {
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
/** 15.12.3 (Java 8) "Compile-Time Step 3: Is the Chosen Method Appropriate?" */
public void checkAppropriateMethodAgainstSupers(char[] selector, MethodBinding compileTimeMethod,
TypeBinding[] parameters, InvocationSite site)
{
ReferenceBinding enclosingType = enclosingReceiverType();
MethodBinding otherMethod = getMethod(enclosingType.superclass(), selector, parameters, site);
if (checkAppropriate(compileTimeMethod, otherMethod, site)) {
ReferenceBinding[] superInterfaces = enclosingType.superInterfaces();
if (superInterfaces != null) {
for (int i = 0; i < superInterfaces.length; i++) {
otherMethod = getMethod(superInterfaces[i], selector, parameters, site);
if (!checkAppropriate(compileTimeMethod, otherMethod, site))
break;
}
}
}
}
private boolean checkAppropriate(MethodBinding compileTimeDeclaration, MethodBinding otherMethod, InvocationSite location) {
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
protected TypeBinding findMethodBinding(BlockScope scope) {
ReferenceContext referenceContext = scope.methodScope().referenceContext;
if (referenceContext instanceof LambdaExpression) {
this.outerInferenceContext = ((LambdaExpression) referenceContext).inferenceContext;
}
if (this.expectedType != null && this.binding instanceof PolyParameterizedGenericMethodBinding) {
this.binding = this.solutionsPerTargetType.get(this.expectedType);
}
if (this.binding == null) { // first look up or a "cache miss" somehow.
this.binding = this.receiver.isImplicitThis() ?
scope.getImplicitMethod(this.selector, this.argumentTypes, this)
: scope.getMethod(this.actualReceiverType, this.selector, this.argumentTypes, this);
if (this.binding instanceof PolyParameterizedGenericMethodBinding) {
this.solutionsPerTargetType = new HashMap<TypeBinding, MethodBinding>();
return new PolyTypeBinding(this);
}
}
resolvePolyExpressionArguments(this, this.binding, this.argumentTypes, scope);
return this.binding.returnType;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
protected TypeBinding findMethodBinding(BlockScope scope) {
ReferenceContext referenceContext = scope.methodScope().referenceContext;
if (referenceContext instanceof LambdaExpression) {
this.outerInferenceContext = ((LambdaExpression) referenceContext).inferenceContext;
}
if (this.expectedType != null && this.binding instanceof PolyParameterizedGenericMethodBinding) {
this.binding = this.solutionsPerTargetType.get(this.expectedType);
}
if (this.binding == null) { // first look up or a "cache miss" somehow.
this.binding = this.receiver.isImplicitThis() ?
scope.getImplicitMethod(this.selector, this.argumentTypes, this)
: scope.getMethod(this.actualReceiverType, this.selector, this.argumentTypes, this);
if (this.binding instanceof PolyParameterizedGenericMethodBinding) {
this.solutionsPerTargetType = new HashMap<TypeBinding, MethodBinding>();
return new PolyTypeBinding(this);
}
}
resolvePolyExpressionArguments(this, this.binding, this.argumentTypes, scope);
return this.binding.returnType;
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
protected TypeBinding findMethodBinding(BlockScope scope) {
ReferenceContext referenceContext = scope.methodScope().referenceContext;
if (referenceContext instanceof LambdaExpression) {
this.outerInferenceContext = ((LambdaExpression) referenceContext).inferenceContext;
}
if (this.expectedType != null && this.binding instanceof PolyParameterizedGenericMethodBinding) {
this.binding = this.solutionsPerTargetType.get(this.expectedType);
}
if (this.binding == null) { // first look up or a "cache miss" somehow.
this.binding = this.receiver.isImplicitThis() ?
scope.getImplicitMethod(this.selector, this.argumentTypes, this)
: scope.getMethod(this.actualReceiverType, this.selector, this.argumentTypes, this);
if (this.binding instanceof PolyParameterizedGenericMethodBinding) {
this.solutionsPerTargetType = new HashMap<TypeBinding, MethodBinding>();
return new PolyTypeBinding(this);
}
}
resolvePolyExpressionArguments(this, this.binding, this.argumentTypes, scope);
return this.binding.returnType;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
protected TypeBinding findMethodBinding(BlockScope scope) {
ReferenceContext referenceContext = scope.methodScope().referenceContext;
if (referenceContext instanceof LambdaExpression) {
this.outerInferenceContext = ((LambdaExpression) referenceContext).inferenceContext;
}
if (this.expectedType != null && this.binding instanceof PolyParameterizedGenericMethodBinding) {
this.binding = this.solutionsPerTargetType.get(this.expectedType);
}
if (this.binding == null) { // first look up or a "cache miss" somehow.
this.binding = this.receiver.isImplicitThis() ?
scope.getImplicitMethod(this.selector, this.argumentTypes, this)
: scope.getMethod(this.actualReceiverType, this.selector, this.argumentTypes, this);
if (this.binding instanceof PolyParameterizedGenericMethodBinding) {
this.solutionsPerTargetType = new HashMap<TypeBinding, MethodBinding>();
return new PolyTypeBinding(this);
}
}
resolvePolyExpressionArguments(this, this.binding, this.argumentTypes, scope);
return this.binding.returnType;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
protected TypeBinding findMethodBinding(BlockScope scope) {
ReferenceContext referenceContext = scope.methodScope().referenceContext;
if (referenceContext instanceof LambdaExpression) {
this.outerInferenceContext = ((LambdaExpression) referenceContext).inferenceContext;
}
if (this.expectedType != null && this.binding instanceof PolyParameterizedGenericMethodBinding) {
this.binding = this.solutionsPerTargetType.get(this.expectedType);
}
if (this.binding == null) { // first look up or a "cache miss" somehow.
this.binding = this.receiver.isImplicitThis() ?
scope.getImplicitMethod(this.selector, this.argumentTypes, this)
: scope.getMethod(this.actualReceiverType, this.selector, this.argumentTypes, this);
if (this.binding instanceof PolyParameterizedGenericMethodBinding) {
this.solutionsPerTargetType = new HashMap<TypeBinding, MethodBinding>();
return new PolyTypeBinding(this);
}
}
resolvePolyExpressionArguments(this, this.binding, this.argumentTypes, scope);
return this.binding.returnType;
}
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
bindingIfNoCast = receiver.isImplicitThis()
? scope.getImplicitMethod(binding.selector, alternateArgumentTypes, fakeInvocationSite)
: scope.getMethod(receiverType, binding.selector, alternateArgumentTypes, fakeInvocationSite);
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
bindingIfNoCast = receiver.isImplicitThis()
? scope.getImplicitMethod(binding.selector, alternateArgumentTypes, fakeInvocationSite)
: scope.getMethod(receiverType, binding.selector, alternateArgumentTypes, fakeInvocationSite);
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
bindingIfNoCast = receiver.isImplicitThis()
? scope.getImplicitMethod(binding.selector, alternateArgumentTypes, fakeInvocationSite)
: scope.getMethod(receiverType, binding.selector, alternateArgumentTypes, fakeInvocationSite);
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
this.binding = this.receiver.isImplicitThis()
? scope.getImplicitMethod(this.selector, argumentTypes, this)
: scope.getMethod(this.actualReceiverType, this.selector, argumentTypes, this);
resolvePolyExpressionArguments(this, this.binding, argumentTypes, scope);
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
this.binding = this.receiver.isImplicitThis()
? scope.getImplicitMethod(this.selector, argumentTypes, this)
: scope.getMethod(this.actualReceiverType, this.selector, argumentTypes, this);
resolvePolyExpressionArguments(this, this.binding, argumentTypes, scope);
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
bindingIfNoCast = receiver.isImplicitThis()
? scope.getImplicitMethod(binding.selector, alternateArgumentTypes, fakeInvocationSite)
: scope.getMethod(receiverType, binding.selector, alternateArgumentTypes, fakeInvocationSite);
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
bindingIfNoCast = receiver.isImplicitThis()
? scope.getImplicitMethod(binding.selector, alternateArgumentTypes, fakeInvocationSite)
: scope.getMethod(receiverType, binding.selector, alternateArgumentTypes, fakeInvocationSite);
内容来源于网络,如有侵权,请联系作者删除!