org.eclipse.jdt.internal.compiler.lookup.BlockScope.getImplicitMethod()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(15.6k)|赞(0)|评价(0)|浏览(73)

本文整理了Java中org.eclipse.jdt.internal.compiler.lookup.BlockScope.getImplicitMethod()方法的一些代码示例,展示了BlockScope.getImplicitMethod()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。BlockScope.getImplicitMethod()方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.lookup.BlockScope
类名称:BlockScope
方法名:getImplicitMethod

BlockScope.getImplicitMethod介绍

暂无

代码示例

代码示例来源: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.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.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.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.eclipse.scout.sdk.deps/org.eclipse.jdt.core

public void resolve(BlockScope scope) {
  if (this.expression != null) {
    if (this.expression.resolveType(scope) != null) {
      TypeBinding javaLangClass = scope.getJavaLangClass();
      if (!javaLangClass.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingClass("java.lang.Class", this.sourceStart, this.sourceEnd); //$NON-NLS-1$
        return;
      }
      TypeBinding javaLangObject = scope.getJavaLangObject();
      if (!javaLangObject.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingClass("java.lang.Object", this.sourceStart, this.sourceEnd); //$NON-NLS-1$
        return;
      }
      TypeBinding[] argumentTypes = new TypeBinding[] {javaLangObject, javaLangClass};
      this.setResultMethod = scope.getImplicitMethod(SETRESULT_SELECTOR, argumentTypes, this);
      if (!this.setResultMethod.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingMethod(ROOT_FULL_CLASS_NAME, new String(SETRESULT_SELECTOR), new String(SETRESULT_ARGUMENTS), this.sourceStart, this.sourceEnd);
        return;
      }
      // in constant case, the implicit conversion cannot be left uninitialized
      if (this.expression.constant != Constant.NotAConstant) {
        // fake 'no implicit conversion' (the return type is always void)
        this.expression.implicitConversion = this.expression.constant.typeID() << 4;
      }
    }
  }
}
public void setActualReceiverType(ReferenceBinding receiverType) {

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

public void resolve(BlockScope scope) {
  if (this.expression != null) {
    if (this.expression.resolveType(scope) != null) {
      TypeBinding javaLangClass = scope.getJavaLangClass();
      if (!javaLangClass.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingClass("java.lang.Class", this.sourceStart, this.sourceEnd); //$NON-NLS-1$
        return;
      }
      TypeBinding javaLangObject = scope.getJavaLangObject();
      if (!javaLangObject.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingClass("java.lang.Object", this.sourceStart, this.sourceEnd); //$NON-NLS-1$
        return;
      }
      TypeBinding[] argumentTypes = new TypeBinding[] {javaLangObject, javaLangClass};
      this.setResultMethod = scope.getImplicitMethod(SETRESULT_SELECTOR, argumentTypes, this);
      if (!this.setResultMethod.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingMethod(ROOT_FULL_CLASS_NAME, new String(SETRESULT_SELECTOR), new String(SETRESULT_ARGUMENTS), this.sourceStart, this.sourceEnd);
        return;
      }
      // in constant case, the implicit conversion cannot be left uninitialized
      if (this.expression.constant != Constant.NotAConstant) {
        // fake 'no implicit conversion' (the return type is always void)
        this.expression.implicitConversion = this.expression.constant.typeID() << 4;
      }
    }
  }
}
public void setActualReceiverType(ReferenceBinding receiverType) {

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
public void resolve(BlockScope scope) {
  if (this.expression != null) {
    if (this.expression.resolveType(scope) != null) {
      TypeBinding javaLangClass = scope.getJavaLangClass();
      if (!javaLangClass.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingClass("java.lang.Class", this.sourceStart, this.sourceEnd); //$NON-NLS-1$
        return;
      }
      TypeBinding javaLangObject = scope.getJavaLangObject();
      if (!javaLangObject.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingClass("java.lang.Object", this.sourceStart, this.sourceEnd); //$NON-NLS-1$
        return;
      }
      TypeBinding[] argumentTypes = new TypeBinding[] {javaLangObject, javaLangClass};
      this.setResultMethod = scope.getImplicitMethod(SETRESULT_SELECTOR, argumentTypes, this);
      if (!this.setResultMethod.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingMethod(ROOT_FULL_CLASS_NAME, new String(SETRESULT_SELECTOR), new String(SETRESULT_ARGUMENTS), this.sourceStart, this.sourceEnd);
        return;
      }
      // in constant case, the implicit conversion cannot be left uninitialized
      if (this.expression.constant != Constant.NotAConstant) {
        // fake 'no implicit conversion' (the return type is always void)
        this.expression.implicitConversion = this.expression.constant.typeID() << 4;
      }
    }
  }
}
@Override

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

public void resolve(BlockScope scope) {
  if (this.expression != null) {
    if (this.expression.resolveType(scope) != null) {
      TypeBinding javaLangClass = scope.getJavaLangClass();
      if (!javaLangClass.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingClass("java.lang.Class", this.sourceStart, this.sourceEnd); //$NON-NLS-1$
        return;
      }
      TypeBinding javaLangObject = scope.getJavaLangObject();
      if (!javaLangObject.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingClass("java.lang.Object", this.sourceStart, this.sourceEnd); //$NON-NLS-1$
        return;
      }
      TypeBinding[] argumentTypes = new TypeBinding[] {javaLangObject, javaLangClass};
      this.setResultMethod = scope.getImplicitMethod(SETRESULT_SELECTOR, argumentTypes, this);
      if (!this.setResultMethod.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingMethod(ROOT_FULL_CLASS_NAME, new String(SETRESULT_SELECTOR), new String(SETRESULT_ARGUMENTS), this.sourceStart, this.sourceEnd);
        return;
      }
      // in constant case, the implicit conversion cannot be left uninitialized
      if (this.expression.constant != Constant.NotAConstant) {
        // fake 'no implicit conversion' (the return type is always void)
        this.expression.implicitConversion = this.expression.constant.typeID() << 4;
      }
    }
  }
}
public void setActualReceiverType(ReferenceBinding receiverType) {

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

public void resolve(BlockScope scope) {
  if (this.expression != null) {
    if (this.expression.resolveType(scope) != null) {
      TypeBinding javaLangClass = scope.getJavaLangClass();
      if (!javaLangClass.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingClass("java.lang.Class", this.sourceStart, this.sourceEnd); //$NON-NLS-1$
        return;
      }
      TypeBinding javaLangObject = scope.getJavaLangObject();
      if (!javaLangObject.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingClass("java.lang.Object", this.sourceStart, this.sourceEnd); //$NON-NLS-1$
        return;
      }
      TypeBinding[] argumentTypes = new TypeBinding[] {javaLangObject, javaLangClass};
      this.setResultMethod = scope.getImplicitMethod(SETRESULT_SELECTOR, argumentTypes, this);
      if (!this.setResultMethod.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingMethod(ROOT_FULL_CLASS_NAME, new String(SETRESULT_SELECTOR), new String(SETRESULT_ARGUMENTS), this.sourceStart, this.sourceEnd);
        return;
      }
      // in constant case, the implicit conversion cannot be left uninitialized
      if (this.expression.constant != Constant.NotAConstant) {
        // fake 'no implicit conversion' (the return type is always void)
        this.expression.implicitConversion = this.expression.constant.typeID() << 4;
      }
    }
  }
}
public void setActualReceiverType(ReferenceBinding receiverType) {

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

public void resolve(BlockScope scope) {
  if (this.expression != null) {
    if (this.expression.resolveType(scope) != null) {
      TypeBinding javaLangClass = scope.getJavaLangClass();
      if (!javaLangClass.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingClass("java.lang.Class", this.sourceStart, this.sourceEnd); //$NON-NLS-1$
        return;
      }
      TypeBinding javaLangObject = scope.getJavaLangObject();
      if (!javaLangObject.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingClass("java.lang.Object", this.sourceStart, this.sourceEnd); //$NON-NLS-1$
        return;
      }
      TypeBinding[] argumentTypes = new TypeBinding[] {javaLangObject, javaLangClass};
      this.setResultMethod = scope.getImplicitMethod(SETRESULT_SELECTOR, argumentTypes, this);
      if (!this.setResultMethod.isValidBinding()) {
        scope.problemReporter().codeSnippetMissingMethod(ROOT_FULL_CLASS_NAME, new String(SETRESULT_SELECTOR), new String(SETRESULT_ARGUMENTS), this.sourceStart, this.sourceEnd);
        return;
      }
      // in constant case, the implicit conversion cannot be left uninitialized
      if (this.expression.constant != Constant.NotAConstant) {
        // fake 'no implicit conversion' (the return type is always void)
        this.expression.implicitConversion = this.expression.constant.typeID() << 4;
      }
    }
  }
}
public void setActualReceiverType(ReferenceBinding receiverType) {

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

} else {
  bindingIfNoCast = receiver.isImplicitThis()
    ? scope.getImplicitMethod(binding.selector, alternateArgumentTypes, fakeInvocationSite)
    : scope.getMethod(receiverType, binding.selector, alternateArgumentTypes, fakeInvocationSite);

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

} else {
  bindingIfNoCast = receiver.isImplicitThis()
    ? scope.getImplicitMethod(binding.selector, alternateArgumentTypes, fakeInvocationSite)
    : scope.getMethod(receiverType, binding.selector, alternateArgumentTypes, fakeInvocationSite);

代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core

} else {
  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

} else {
  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

? 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

? scope.getImplicitMethod(this.selector, argumentTypes, this)
    : scope.getMethod(this.actualReceiverType, this.selector, argumentTypes, this);
resolvePolyExpressionArguments(this, this.binding, argumentTypes, scope);

代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj

} else {
  bindingIfNoCast = receiver.isImplicitThis()
    ? scope.getImplicitMethod(binding.selector, alternateArgumentTypes, fakeInvocationSite)
    : scope.getMethod(receiverType, binding.selector, alternateArgumentTypes, fakeInvocationSite);

代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps

} else {
  bindingIfNoCast = receiver.isImplicitThis()
    ? scope.getImplicitMethod(binding.selector, alternateArgumentTypes, fakeInvocationSite)
    : scope.getMethod(receiverType, binding.selector, alternateArgumentTypes, fakeInvocationSite);

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

} else {
  bindingIfNoCast = receiver.isImplicitThis()
    ? scope.getImplicitMethod(binding.selector, alternateArgumentTypes, fakeInvocationSite)
    : scope.getMethod(receiverType, binding.selector, alternateArgumentTypes, fakeInvocationSite);

相关文章

微信公众号

最新文章

更多

BlockScope类方法