Lines 1357-1362
Link Here
|
1357 |
typeDecl.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition); |
1357 |
typeDecl.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition); |
1358 |
} |
1358 |
} |
1359 |
protected void consumeAnnotationTypeDeclarationHeader() { |
1359 |
protected void consumeAnnotationTypeDeclarationHeader() { |
|
|
1360 |
TypeDeclaration annotationTypeDeclaration = (TypeDeclaration) this.astStack[this.astPtr]; |
1361 |
if (this.currentToken == TokenNameLBRACE) { |
1362 |
annotationTypeDeclaration.bodyStart = this.scanner.currentPosition; |
1363 |
} |
1360 |
if (this.currentElement != null) { |
1364 |
if (this.currentElement != null) { |
1361 |
this.restartRecovery = true; // used to avoid branching back into the regular automaton |
1365 |
this.restartRecovery = true; // used to avoid branching back into the regular automaton |
1362 |
} |
1366 |
} |
Lines 1420-1430
Link Here
|
1420 |
0, |
1424 |
0, |
1421 |
length); |
1425 |
length); |
1422 |
} |
1426 |
} |
1423 |
annotationTypeDeclaration.bodyStart = annotationTypeDeclaration.sourceEnd + 1; |
|
|
1424 |
|
1427 |
|
1425 |
// javadoc |
1428 |
// javadoc |
1426 |
annotationTypeDeclaration.javadoc = this.javadoc; |
1429 |
annotationTypeDeclaration.javadoc = this.javadoc; |
1427 |
this.javadoc = null; |
1430 |
this.javadoc = null; |
|
|
1431 |
annotationTypeDeclaration.bodyStart = annotationTypeDeclaration.sourceEnd + 1; |
1432 |
|
1428 |
pushOnAstStack(annotationTypeDeclaration); |
1433 |
pushOnAstStack(annotationTypeDeclaration); |
1429 |
if(!this.statementRecoveryActivated && |
1434 |
if(!this.statementRecoveryActivated && |
1430 |
this.options.sourceLevel < ClassFileConstants.JDK1_5 && |
1435 |
this.options.sourceLevel < ClassFileConstants.JDK1_5 && |
Lines 1449-1457
Link Here
|
1449 |
System.arraycopy(this.genericsStack, this.genericsPtr + 1, annotationTypeDeclaration.typeParameters = new TypeParameter[length], 0, length); |
1454 |
System.arraycopy(this.genericsStack, this.genericsPtr + 1, annotationTypeDeclaration.typeParameters = new TypeParameter[length], 0, length); |
1450 |
|
1455 |
|
1451 |
problemReporter().invalidUsageOfTypeParametersForAnnotationDeclaration(annotationTypeDeclaration); |
1456 |
problemReporter().invalidUsageOfTypeParametersForAnnotationDeclaration(annotationTypeDeclaration); |
1452 |
|
1457 |
|
1453 |
annotationTypeDeclaration.bodyStart = annotationTypeDeclaration.typeParameters[length-1].declarationSourceEnd + 1; |
|
|
1454 |
|
1455 |
// annotationTypeDeclaration.typeParameters = null; |
1458 |
// annotationTypeDeclaration.typeParameters = null; |
1456 |
|
1459 |
|
1457 |
this.listTypeParameterLength = 0; |
1460 |
this.listTypeParameterLength = 0; |
Lines 1473-1478
Link Here
|
1473 |
annotationTypeDeclaration.sourceStart = (int) (pos >>> 32); |
1476 |
annotationTypeDeclaration.sourceStart = (int) (pos >>> 32); |
1474 |
annotationTypeDeclaration.name = this.identifierStack[this.identifierPtr--]; |
1477 |
annotationTypeDeclaration.name = this.identifierStack[this.identifierPtr--]; |
1475 |
this.identifierLengthPtr--; |
1478 |
this.identifierLengthPtr--; |
|
|
1479 |
annotationTypeDeclaration.bodyStart = annotationTypeDeclaration.typeParameters[length-1].declarationSourceEnd + 1; |
1476 |
|
1480 |
|
1477 |
//compute the declaration source too |
1481 |
//compute the declaration source too |
1478 |
// 'interface' push two int positions: the beginning of the class token and its end. |
1482 |
// 'interface' push two int positions: the beginning of the class token and its end. |