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

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

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

Parser.copyDims介绍

暂无

代码示例

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

protected void consumeMethodHeaderExtendedDims() {
  // MethodHeaderExtendedDims ::= Dimsopt
  // now we update the returnType of the method
  MethodDeclaration md = (MethodDeclaration) this.astStack[this.astPtr];
  int extendedDims = this.intStack[this.intPtr--];
  if(md.isAnnotationMethod()) {
    ((AnnotationMethodDeclaration)md).extendedDimensions = extendedDims;
  }
  if (extendedDims != 0) {
    TypeReference returnType = md.returnType;
    md.sourceEnd = this.endPosition;
    int dims = returnType.dimensions() + extendedDims;
    md.returnType = copyDims(returnType, dims);
    if (this.currentToken == TokenNameLBRACE){
      md.bodyStart = this.endPosition + 1;
    }
    // recovery
    if (this.currentElement != null){
      this.lastCheckPoint = md.bodyStart;
    }
  }
}
protected void consumeMethodHeaderName(boolean isAnnotationMethod) {

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

protected void consumeMethodHeaderExtendedDims() {
  // MethodHeaderExtendedDims ::= Dimsopt
  // now we update the returnType of the method
  MethodDeclaration md = (MethodDeclaration) this.astStack[this.astPtr];
  int extendedDims = this.intStack[this.intPtr--];
  if(md.isAnnotationMethod()) {
    ((AnnotationMethodDeclaration)md).extendedDimensions = extendedDims;
  }
  if (extendedDims != 0) {
    TypeReference returnType = md.returnType;
    md.sourceEnd = this.endPosition;
    int dims = returnType.dimensions() + extendedDims;
    md.returnType = copyDims(returnType, dims);
    if (this.currentToken == TokenNameLBRACE){
      md.bodyStart = this.endPosition + 1;
    }
    // recovery
    if (this.currentElement != null){
      this.lastCheckPoint = md.bodyStart;
    }
  }
}
protected void consumeMethodHeaderName(boolean isAnnotationMethod) {

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

protected void consumeMethodHeaderExtendedDims() {
  // MethodHeaderExtendedDims ::= Dimsopt
  // now we update the returnType of the method
  MethodDeclaration md = (MethodDeclaration) this.astStack[this.astPtr];
  int extendedDims = this.intStack[this.intPtr--];
  if(md.isAnnotationMethod()) {
    ((AnnotationMethodDeclaration)md).extendedDimensions = extendedDims;
  }
  if (extendedDims != 0) {
    TypeReference returnType = md.returnType;
    md.sourceEnd = this.endPosition;
    int dims = returnType.dimensions() + extendedDims;
    md.returnType = copyDims(returnType, dims);
    if (this.currentToken == TokenNameLBRACE){
      md.bodyStart = this.endPosition + 1;
    }
    // recovery
    if (this.currentElement != null){
      this.lastCheckPoint = md.bodyStart;
    }
  }
}
protected void consumeMethodHeaderName(boolean isAnnotationMethod) {

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

protected TypeReference copyDims(TypeReference typeRef, int dim) {
  TypeReference result = super.copyDims(typeRef, dim);
   if (this.nodeSet.removePossibleMatch(typeRef) != null)
    this.nodeSet.addPossibleMatch(result);
   else if (this.nodeSet.removeTrustedMatch(typeRef) != null)
    this.nodeSet.addTrustedMatch(result, true);
  return result;
}
protected TypeReference getTypeReference(int dim) {

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

TypeReference type = getTypeReference(typeDimensions);
if (isVarArgs) {
  type = copyDims(type, typeDimensions + 1);
  if (extendedDimensions == 0) {
    type.sourceEnd = endOfEllipsis;

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

TypeReference type = getTypeReference(typeDimensions);
if (isVarArgs) {
  type = copyDims(type, typeDimensions + 1);
  if (extendedDimensions == 0) {
    type.sourceEnd = endOfEllipsis;

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

TypeReference type = getTypeReference(typeDimensions);
if (isVarArgs) {
  type = copyDims(type, typeDimensions + 1);
  if (extendedDimensions == 0) {
    type.sourceEnd = endOfEllipsis;

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

} else {
  int dimension = typeDim + extendedDimension;
  declaration.type = copyDims(type, dimension);

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

TypeReference type = getTypeReference(typeDimensions);
if (isVarArgs) {
  type = copyDims(type, typeDimensions + 1);
  if (extendedDimensions == 0) {
    type.sourceEnd = endOfEllipsis;

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

} else {
  int dimension = typeDim + extendedDimension;
  declaration.type = copyDims(type, dimension);

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

} else {
  int dimension = typeDim + extendedDimension;
  declaration.type = copyDims(type, dimension);

相关文章

微信公众号

最新文章

更多

Parser类方法