org.eclipse.jdt.internal.compiler.parser.Parser.createIntersectionCastTypeReference()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(14.8k)|赞(0)|评价(0)|浏览(103)

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

Parser.createIntersectionCastTypeReference介绍

暂无

代码示例

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

protected void consumeCastExpressionLL1WithBounds() {
  //CastExpression ::= '(' Name AdditionalBoundsList ')' UnaryExpressionNotPlusMinus
  Expression cast;
  Expression exp;
  int length;
  exp = this.expressionStack[this.expressionPtr--];
  this.expressionLengthPtr --;
  TypeReference[] bounds = new TypeReference[length = this.expressionLengthStack[this.expressionLengthPtr]];
  System.arraycopy(this.expressionStack, this.expressionPtr -= (length - 1), bounds, 0, length);
  this.expressionStack[this.expressionPtr] =
    cast = new CastExpression(
      exp,
      createIntersectionCastTypeReference(bounds));
  this.expressionLengthStack[this.expressionLengthPtr] = 1;
  updateSourcePosition(cast);
  cast.sourceEnd=exp.sourceEnd;
}
protected void consumeCastExpressionWithGenericsArray() {

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

protected void consumeCastExpressionLL1WithBounds() {
  //CastExpression ::= '(' Name AdditionalBoundsList ')' UnaryExpressionNotPlusMinus
  Expression cast;
  Expression exp;
  int length;
  exp = this.expressionStack[this.expressionPtr--];
  this.expressionLengthPtr --;
  TypeReference[] bounds = new TypeReference[length = this.expressionLengthStack[this.expressionLengthPtr]];
  System.arraycopy(this.expressionStack, this.expressionPtr -= (length - 1), bounds, 0, length);
  this.expressionStack[this.expressionPtr] =
    cast = new CastExpression(
      exp,
      createIntersectionCastTypeReference(bounds));
  this.expressionLengthStack[this.expressionLengthPtr] = 1;
  updateSourcePosition(cast);
  cast.sourceEnd=exp.sourceEnd;
}
protected void consumeCastExpressionWithGenericsArray() {

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

protected void consumeCastExpressionLL1WithBounds() {
  //CastExpression ::= '(' Name AdditionalBoundsList ')' UnaryExpressionNotPlusMinus
  Expression cast;
  Expression exp;
  int length;
  exp = this.expressionStack[this.expressionPtr--];
  this.expressionLengthPtr --;
  TypeReference[] bounds = new TypeReference[length = this.expressionLengthStack[this.expressionLengthPtr]];
  System.arraycopy(this.expressionStack, this.expressionPtr -= (length - 1), bounds, 0, length);
  this.expressionStack[this.expressionPtr] =
    cast = new CastExpression(
      exp,
      createIntersectionCastTypeReference(bounds));
  this.expressionLengthStack[this.expressionLengthPtr] = 1;
  updateSourcePosition(cast);
  cast.sourceEnd=exp.sourceEnd;
}
protected void consumeCastExpressionWithGenericsArray() {

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

protected void consumeCastExpressionLL1WithBounds() {
  //CastExpression ::= '(' Name AdditionalBoundsList ')' UnaryExpressionNotPlusMinus
  Expression cast;
  Expression exp;
  int length;
  exp = this.expressionStack[this.expressionPtr--];
  this.expressionLengthPtr --;
  TypeReference[] bounds = new TypeReference[length = this.expressionLengthStack[this.expressionLengthPtr]];
  System.arraycopy(this.expressionStack, this.expressionPtr -= (length - 1), bounds, 0, length);
  this.expressionStack[this.expressionPtr] =
    cast = new CastExpression(
      exp,
      createIntersectionCastTypeReference(bounds));
  this.expressionLengthStack[this.expressionLengthPtr] = 1;
  updateSourcePosition(cast);
  cast.sourceEnd=exp.sourceEnd;
}
protected void consumeCastExpressionWithGenericsArray() {

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

protected void consumeCastExpressionLL1WithBounds() {
  //CastExpression ::= '(' Name AdditionalBoundsList ')' UnaryExpressionNotPlusMinus
  Expression cast;
  Expression exp;
  int length;
  exp = this.expressionStack[this.expressionPtr--];
  this.expressionLengthPtr --;
  TypeReference[] bounds = new TypeReference[length = this.expressionLengthStack[this.expressionLengthPtr]];
  System.arraycopy(this.expressionStack, this.expressionPtr -= (length - 1), bounds, 0, length);
  this.expressionStack[this.expressionPtr] =
    cast = new CastExpression(
      exp,
      createIntersectionCastTypeReference(bounds));
  this.expressionLengthStack[this.expressionLengthPtr] = 1;
  updateSourcePosition(cast);
  cast.sourceEnd=exp.sourceEnd;
}
protected void consumeCastExpressionWithGenericsArray() {

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

protected void consumeCastExpressionLL1WithBounds() {
  //CastExpression ::= '(' Name AdditionalBoundsList ')' UnaryExpressionNotPlusMinus
  Expression cast;
  Expression exp;
  int length;
  exp = this.expressionStack[this.expressionPtr--];
  this.expressionLengthPtr --;
  TypeReference[] bounds = new TypeReference[length = this.expressionLengthStack[this.expressionLengthPtr]];
  System.arraycopy(this.expressionStack, this.expressionPtr -= (length - 1), bounds, 0, length);
  this.expressionStack[this.expressionPtr] =
    cast = new CastExpression(
      exp,
      createIntersectionCastTypeReference(bounds));
  this.expressionLengthStack[this.expressionLengthPtr] = 1;
  updateSourcePosition(cast);
  cast.sourceEnd=exp.sourceEnd;
}
protected void consumeCastExpressionWithGenericsArray() {

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

protected void consumeCastExpressionLL1WithBounds() {
  //CastExpression ::= '(' Name AdditionalBoundsList ')' UnaryExpressionNotPlusMinus
  Expression cast;
  Expression exp;
  int length;
  exp = this.expressionStack[this.expressionPtr--];
  this.expressionLengthPtr --;
  TypeReference[] bounds = new TypeReference[length = this.expressionLengthStack[this.expressionLengthPtr]];
  System.arraycopy(this.expressionStack, this.expressionPtr -= (length - 1), bounds, 0, length);
  this.expressionStack[this.expressionPtr] =
    cast = new CastExpression(
      exp,
      createIntersectionCastTypeReference(bounds));
  this.expressionLengthStack[this.expressionLengthPtr] = 1;
  updateSourcePosition(cast);
  cast.sourceEnd=exp.sourceEnd;
}
protected void consumeCastExpressionWithGenericsArray() {

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

protected void consumeCastExpressionLL1WithBounds() {
  //CastExpression ::= '(' Name AdditionalBoundsList ')' UnaryExpressionNotPlusMinus
  Expression cast;
  Expression exp;
  int length;
  exp = this.expressionStack[this.expressionPtr--];
  this.expressionLengthPtr --;
  TypeReference[] bounds = new TypeReference[length = this.expressionLengthStack[this.expressionLengthPtr]];
  System.arraycopy(this.expressionStack, this.expressionPtr -= (length - 1), bounds, 0, length);
  this.expressionStack[this.expressionPtr] =
    cast = new CastExpression(
      exp,
      createIntersectionCastTypeReference(bounds));
  this.expressionLengthStack[this.expressionLengthPtr] = 1;
  updateSourcePosition(cast);
  cast.sourceEnd=exp.sourceEnd;
}
protected void consumeCastExpressionWithGenericsArray() {

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

protected void consumeCastExpressionWithPrimitiveType() {
  // CastExpression ::= PushLPAREN PrimitiveType Dimsopt AdditionalBoundsListOpt PushRPAREN InsideCastExpression UnaryExpression

  //this.intStack : posOfLeftParen dim posOfRightParen

  TypeReference[] bounds = null;
  int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];
  if (additionalBoundsLength > 0) {
    bounds = new TypeReference[additionalBoundsLength + 1];
    this.genericsPtr -= additionalBoundsLength;
    System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 1, additionalBoundsLength);
  }
  
  //optimize the push/pop
  Expression exp;
  Expression cast;
  TypeReference castType;
  int end = this.intStack[this.intPtr--];
  if (additionalBoundsLength > 0) {
    bounds[0] = getTypeReference(this.intStack[this.intPtr--]);
    castType = createIntersectionCastTypeReference(bounds); 
  } else {
    castType = getTypeReference(this.intStack[this.intPtr--]);
  }
  this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType);
  castType.sourceEnd = end - 1;
  castType.sourceStart = (cast.sourceStart = this.intStack[this.intPtr--]) + 1;
  cast.sourceEnd = exp.sourceEnd;
}
protected void consumeCastExpressionWithQualifiedGenericsArray() {

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

protected void consumeCastExpressionWithPrimitiveType() {
  // CastExpression ::= PushLPAREN PrimitiveType Dimsopt AdditionalBoundsListOpt PushRPAREN InsideCastExpression UnaryExpression

  //this.intStack : posOfLeftParen dim posOfRightParen

  TypeReference[] bounds = null;
  int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];
  if (additionalBoundsLength > 0) {
    bounds = new TypeReference[additionalBoundsLength + 1];
    this.genericsPtr -= additionalBoundsLength;
    System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 1, additionalBoundsLength);
  }
  
  //optimize the push/pop
  Expression exp;
  Expression cast;
  TypeReference castType;
  int end = this.intStack[this.intPtr--];
  if (additionalBoundsLength > 0) {
    bounds[0] = getTypeReference(this.intStack[this.intPtr--]);
    castType = createIntersectionCastTypeReference(bounds); 
  } else {
    castType = getTypeReference(this.intStack[this.intPtr--]);
  }
  this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType);
  castType.sourceEnd = end - 1;
  castType.sourceStart = (cast.sourceStart = this.intStack[this.intPtr--]) + 1;
  cast.sourceEnd = exp.sourceEnd;
}
protected void consumeCastExpressionWithQualifiedGenericsArray() {

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

protected void consumeCastExpressionWithPrimitiveType() {
  // CastExpression ::= PushLPAREN PrimitiveType Dimsopt AdditionalBoundsListOpt PushRPAREN InsideCastExpression UnaryExpression

  //this.intStack : posOfLeftParen dim posOfRightParen

  TypeReference[] bounds = null;
  int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];
  if (additionalBoundsLength > 0) {
    bounds = new TypeReference[additionalBoundsLength + 1];
    this.genericsPtr -= additionalBoundsLength;
    System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 1, additionalBoundsLength);
  }
  
  //optimize the push/pop
  Expression exp;
  Expression cast;
  TypeReference castType;
  int end = this.intStack[this.intPtr--];
  if (additionalBoundsLength > 0) {
    bounds[0] = getTypeReference(this.intStack[this.intPtr--]);
    castType = createIntersectionCastTypeReference(bounds); 
  } else {
    castType = getTypeReference(this.intStack[this.intPtr--]);
  }
  this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType);
  castType.sourceEnd = end - 1;
  castType.sourceStart = (cast.sourceStart = this.intStack[this.intPtr--]) + 1;
  cast.sourceEnd = exp.sourceEnd;
}
protected void consumeCastExpressionWithQualifiedGenericsArray() {

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

protected void consumeCastExpressionWithPrimitiveType() {
  // CastExpression ::= PushLPAREN PrimitiveType Dimsopt AdditionalBoundsListOpt PushRPAREN InsideCastExpression UnaryExpression

  //this.intStack : posOfLeftParen dim posOfRightParen

  TypeReference[] bounds = null;
  int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];
  if (additionalBoundsLength > 0) {
    bounds = new TypeReference[additionalBoundsLength + 1];
    this.genericsPtr -= additionalBoundsLength;
    System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 1, additionalBoundsLength);
  }
  
  //optimize the push/pop
  Expression exp;
  Expression cast;
  TypeReference castType;
  int end = this.intStack[this.intPtr--];
  if (additionalBoundsLength > 0) {
    bounds[0] = getTypeReference(this.intStack[this.intPtr--]);
    castType = createIntersectionCastTypeReference(bounds); 
  } else {
    castType = getTypeReference(this.intStack[this.intPtr--]);
  }
  this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType);
  castType.sourceEnd = end - 1;
  castType.sourceStart = (cast.sourceStart = this.intStack[this.intPtr--]) + 1;
  cast.sourceEnd = exp.sourceEnd;
}
protected void consumeCastExpressionWithQualifiedGenericsArray() {

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

castType = createIntersectionCastTypeReference(bounds);

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

castType = createIntersectionCastTypeReference(bounds);

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

protected void consumeCastExpressionWithGenericsArray() {
  // CastExpression ::= PushLPAREN Name TypeArguments Dimsopt AdditionalBoundsListOpt PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
  
  TypeReference[] bounds = null;
  int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];
  if (additionalBoundsLength > 0) {
    bounds = new TypeReference[additionalBoundsLength + 1];
    this.genericsPtr -= additionalBoundsLength;
    System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 1, additionalBoundsLength);
  }
  Expression exp;
  Expression cast;
  TypeReference castType;
  int end = this.intStack[this.intPtr--];

  int dim = this.intStack[this.intPtr--];
  pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
  if (additionalBoundsLength > 0) {
    bounds[0] = getTypeReference(dim);
    castType = createIntersectionCastTypeReference(bounds); 
  } else {
    castType = getTypeReference(dim);
  }
  this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType);
  this.intPtr--;  // pop position of '<'
  castType.sourceEnd = end - 1;
  castType.sourceStart = (cast.sourceStart = this.intStack[this.intPtr--]) + 1;
  cast.sourceEnd = exp.sourceEnd;
}
protected void consumeCastExpressionWithNameArray() {

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

castType = createIntersectionCastTypeReference(bounds);

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

protected void consumeCastExpressionWithGenericsArray() {
  // CastExpression ::= PushLPAREN Name TypeArguments Dimsopt AdditionalBoundsListOpt PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
  
  TypeReference[] bounds = null;
  int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];
  if (additionalBoundsLength > 0) {
    bounds = new TypeReference[additionalBoundsLength + 1];
    this.genericsPtr -= additionalBoundsLength;
    System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 1, additionalBoundsLength);
  }
  Expression exp;
  Expression cast;
  TypeReference castType;
  int end = this.intStack[this.intPtr--];

  int dim = this.intStack[this.intPtr--];
  pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
  if (additionalBoundsLength > 0) {
    bounds[0] = getTypeReference(dim);
    castType = createIntersectionCastTypeReference(bounds); 
  } else {
    castType = getTypeReference(dim);
  }
  this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType);
  this.intPtr--;  // pop position of '<'
  castType.sourceEnd = end - 1;
  castType.sourceStart = (cast.sourceStart = this.intStack[this.intPtr--]) + 1;
  cast.sourceEnd = exp.sourceEnd;
}
protected void consumeCastExpressionWithNameArray() {

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

castType = createIntersectionCastTypeReference(bounds);
} else {
  castType = getTypeReference(this.intStack[this.intPtr--]);

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

castType = createIntersectionCastTypeReference(bounds);
} else {
  castType = getTypeReference(this.intStack[this.intPtr--]);

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

castType = createIntersectionCastTypeReference(bounds);
} else {
  castType = getTypeReference(this.intStack[this.intPtr--]);

相关文章

微信公众号

最新文章

更多

Parser类方法