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

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

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

BlockScope.boxing介绍

暂无

代码示例

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

public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo, boolean isReadAccess) {

  if (this.delegateThis == null) {
    super.manageSyntheticAccessIfNecessary(currentScope, flowInfo, isReadAccess);
    return;
  }

  if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0) return;
  //If inlinable field, forget the access emulation, the code gen will directly target it
  if (this.constant != Constant.NotAConstant)
    return;
  // if field from parameterized type got found, use the original field at codegen time
  if (this.binding instanceof ParameterizedFieldBinding) {
    ParameterizedFieldBinding parameterizedField = (ParameterizedFieldBinding) this.binding;
    FieldBinding codegenField = parameterizedField.originalField;
    // extra cast needed if field type was type variable
    if ((codegenField.type.tagBits & TagBits.HasTypeVariable) != 0) {
      this.genericCast = codegenField.type.genericCast(currentScope.boxing(parameterizedField.type)); // runtimeType could be base type in boxing case
    }
  }
}
/**

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

public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo, boolean isReadAccess) {

  if (this.delegateThis == null) {
    super.manageSyntheticAccessIfNecessary(currentScope, flowInfo, isReadAccess);
    return;
  }

  if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0) return;
  //If inlinable field, forget the access emulation, the code gen will directly target it
  if (this.constant != Constant.NotAConstant)
    return;
  // if field from parameterized type got found, use the original field at codegen time
  if (this.binding instanceof ParameterizedFieldBinding) {
    ParameterizedFieldBinding parameterizedField = (ParameterizedFieldBinding) this.binding;
    FieldBinding codegenField = parameterizedField.originalField;
    // extra cast needed if field type was type variable
    if ((codegenField.type.tagBits & TagBits.HasTypeVariable) != 0) {
      this.genericCast = codegenField.type.genericCast(currentScope.boxing(parameterizedField.type)); // runtimeType could be base type in boxing case
    }
  }
}
/**

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

public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo, boolean isReadAccess) {

  if (this.delegateThis == null) {
    super.manageSyntheticAccessIfNecessary(currentScope, flowInfo, isReadAccess);
    return;
  }

  if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0) return;
  //If inlinable field, forget the access emulation, the code gen will directly target it
  if (this.constant != Constant.NotAConstant)
    return;
  // if field from parameterized type got found, use the original field at codegen time
  if (this.binding instanceof ParameterizedFieldBinding) {
    ParameterizedFieldBinding parameterizedField = (ParameterizedFieldBinding) this.binding;
    FieldBinding codegenField = parameterizedField.originalField;
    // extra cast needed if field type was type variable
    if ((codegenField.type.tagBits & TagBits.HasTypeVariable) != 0) {
      this.genericCast = codegenField.type.genericCast(currentScope.boxing(parameterizedField.type)); // runtimeType could be base type in boxing case
    }
  }
}
/**

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

public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo, boolean isReadAccess) {

  if (this.delegateThis == null) {
    super.manageSyntheticAccessIfNecessary(currentScope, flowInfo, isReadAccess);
    return;
  }

  if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0) return;
  //If inlinable field, forget the access emulation, the code gen will directly target it
  if (this.constant != Constant.NotAConstant)
    return;
  // if field from parameterized type got found, use the original field at codegen time
  if (this.binding instanceof ParameterizedFieldBinding) {
    ParameterizedFieldBinding parameterizedField = (ParameterizedFieldBinding) this.binding;
    FieldBinding codegenField = parameterizedField.originalField;
    // extra cast needed if field type was type variable
    if ((codegenField.type.tagBits & TagBits.HasTypeVariable) != 0) {
      this.genericCast = codegenField.type.genericCast(currentScope.boxing(parameterizedField.type)); // runtimeType could be base type in boxing case
    }
  }
}
/**

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

public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo, boolean isReadAccess) {

  if (this.delegateThis == null) {
    super.manageSyntheticAccessIfNecessary(currentScope, flowInfo, isReadAccess);
    return;
  }

  if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0) return;
  //If inlinable field, forget the access emulation, the code gen will directly target it
  if (this.constant != Constant.NotAConstant)
    return;
  // if field from parameterized type got found, use the original field at codegen time
  if (this.binding instanceof ParameterizedFieldBinding) {
    ParameterizedFieldBinding parameterizedField = (ParameterizedFieldBinding) this.binding;
    FieldBinding codegenField = parameterizedField.originalField;
    // extra cast needed if field type was type variable
    if ((codegenField.type.tagBits & TagBits.HasTypeVariable) != 0) {
      this.genericCast = codegenField.type.genericCast(currentScope.boxing(parameterizedField.type)); // runtimeType could be base type in boxing case
    }
  }
}
/**

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

@Override
public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo, boolean isReadAccess) {

  if (this.delegateThis == null) {
    super.manageSyntheticAccessIfNecessary(currentScope, flowInfo, isReadAccess);
    return;
  }

  if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0) return;
  //If inlinable field, forget the access emulation, the code gen will directly target it
  if (this.constant != Constant.NotAConstant)
    return;
  // if field from parameterized type got found, use the original field at codegen time
  if (this.binding instanceof ParameterizedFieldBinding) {
    ParameterizedFieldBinding parameterizedField = (ParameterizedFieldBinding) this.binding;
    FieldBinding codegenField = parameterizedField.originalField;
    // extra cast needed if field type was type variable
    if ((codegenField.type.tagBits & TagBits.HasTypeVariable) != 0) {
      this.genericCast = codegenField.type.genericCast(currentScope.boxing(parameterizedField.type)); // runtimeType could be base type in boxing case
    }
  }
}
/**

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

/**
 * Check if the invocation is likely a bug.
 * @param currentScope
 * @return false, if the typeToCheck does not seem to related to the expectedType
 */
public boolean isDangerous(BlockScope currentScope) {
  TypeBinding typeToCheck2 = this.typeToCheck;
  // take autoboxing into account
  if (typeToCheck2.isBaseType()) {
    typeToCheck2 = currentScope.boxing(typeToCheck2);
  }
  TypeBinding expectedType2 = this.expectedType;
  if (expectedType2.isBaseType()) { // can happen for the first parameter of java.util.Object.equals
    expectedType2 = currentScope.boxing(expectedType2);
  }
  if(this.dangerousMethod != DangerousMethod.Equals && currentScope.compilerOptions().reportUnlikelyCollectionMethodArgumentTypeStrict) {
    return !typeToCheck2.isCompatibleWith(expectedType2, currentScope);
  }
  // unless both types are true type variables (not captures), take the erasure of both.
  if (typeToCheck2.isCapture() || !typeToCheck2.isTypeVariable() || expectedType2.isCapture()
      || !expectedType2.isTypeVariable()) {
    typeToCheck2 = typeToCheck2.erasure();
    expectedType2 = expectedType2.erasure();
  }
  return !typeToCheck2.isCompatibleWith(expectedType2, currentScope)
      && !expectedType2.isCompatibleWith(typeToCheck2, currentScope);
}

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

/**
 * Check if the invocation is likely a bug.
 * @param currentScope
 * @return false, if the typeToCheck does not seem to related to the expectedType
 */
public boolean isDangerous(BlockScope currentScope) {
  TypeBinding typeToCheck2 = this.typeToCheck;
  // take autoboxing into account
  if (typeToCheck2.isBaseType()) {
    typeToCheck2 = currentScope.boxing(typeToCheck2);
  }
  TypeBinding expectedType2 = this.expectedType;
  if (expectedType2.isBaseType()) { // can happen for the first parameter of java.util.Object.equals
    expectedType2 = currentScope.boxing(expectedType2);
  }
  if(this.dangerousMethod != DangerousMethod.Equals && currentScope.compilerOptions().reportUnlikelyCollectionMethodArgumentTypeStrict) {
    return !typeToCheck2.isCompatibleWith(expectedType2, currentScope);
  }
  // unless both types are true type variables (not captures), take the erasure of both.
  if (typeToCheck2.isCapture() || !typeToCheck2.isTypeVariable() || expectedType2.isCapture()
      || !expectedType2.isTypeVariable()) {
    typeToCheck2 = typeToCheck2.erasure();
    expectedType2 = expectedType2.erasure();
  }
  return !typeToCheck2.isCompatibleWith(expectedType2, currentScope)
      && !expectedType2.isCompatibleWith(typeToCheck2, currentScope);
}

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

boxedType = scope.environment().getResolvedType(JAVA_LANG_VOID, scope);
} else {
  boxedType = scope.boxing(this.targetType);

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

boxedType = scope.environment().getResolvedType(JAVA_LANG_VOID, scope);
} else {
  boxedType = scope.boxing(this.targetType);

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

boxedType = scope.environment().getResolvedType(JAVA_LANG_VOID, scope);
} else {
  boxedType = scope.boxing(this.targetType);

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

boxedType = scope.environment().getResolvedType(JAVA_LANG_VOID, scope);
} else {
  boxedType = scope.boxing(this.targetType);

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

boxedType = scope.environment().getResolvedType(JAVA_LANG_VOID, scope);
} else {
  boxedType = scope.boxing(this.targetType);

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

boxedType = environment.getResolvedType(JAVA_LANG_VOID, scope);
} else {
  boxedType = scope.boxing(this.targetType);

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

boxedType = scope.environment().getResolvedType(JAVA_LANG_VOID, scope);
} else {
  boxedType = scope.boxing(this.targetType);

代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj

boxedType = environment.getResolvedType(JAVA_LANG_VOID, scope);
} else {
  boxedType = scope.boxing(this.targetType);

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

boxedType = environment.getResolvedType(JAVA_LANG_VOID, scope);
} else {
  boxedType = scope.boxing(this.targetType);

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

boxedType = environment.getResolvedJavaBaseType(JAVA_LANG_VOID, scope);
} else {
  boxedType = scope.boxing(this.targetType);

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

boxedType = environment.getResolvedJavaBaseType(JAVA_LANG_VOID, scope);
} else {
  boxedType = scope.boxing(this.targetType);

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

if (bindingParameter.isPrimitiveType() && !descriptorParameter.isPrimitiveType()) {
  bindingParameterToCheck = scope.environment().createAnnotatedType(scope.boxing(bindingParameter),
      new AnnotationBinding[] { scope.environment().getNonNullAnnotation() });
} else {

相关文章

微信公众号

最新文章

更多

BlockScope类方法