Lines 451-456
Link Here
|
451 |
problemReporter().illegalModifierForInterface(sourceType); |
451 |
problemReporter().illegalModifierForInterface(sourceType); |
452 |
} |
452 |
} |
453 |
} |
453 |
} |
|
|
454 |
/* |
455 |
* AccSynthetic must be set if the target is greater than 1.5. 1.5 VM don't support AccSynthetics flag. |
456 |
*/ |
457 |
if (sourceType.sourceName == TypeConstants.PACKAGE_INFO_NAME && this.compilerOptions().targetJDK > ClassFileConstants.JDK1_5) { |
458 |
modifiers |= ClassFileConstants.AccSynthetic; |
459 |
} |
454 |
modifiers |= ClassFileConstants.AccAbstract; |
460 |
modifiers |= ClassFileConstants.AccAbstract; |
455 |
} else if ((realModifiers & ClassFileConstants.AccEnum) != 0) { |
461 |
} else if ((realModifiers & ClassFileConstants.AccEnum) != 0) { |
456 |
// detect abnormal cases for enums |
462 |
// detect abnormal cases for enums |
Lines 473-479
Link Here
|
473 |
if ((referenceContext.bits & ASTNode.HasAbstractMethods) != 0) { |
479 |
if ((referenceContext.bits & ASTNode.HasAbstractMethods) != 0) { |
474 |
modifiers |= ClassFileConstants.AccAbstract; |
480 |
modifiers |= ClassFileConstants.AccAbstract; |
475 |
break checkAbstractEnum; |
481 |
break checkAbstractEnum; |
476 |
} |
482 |
} |
477 |
// body of enum constant must implement any inherited abstract methods |
483 |
// body of enum constant must implement any inherited abstract methods |
478 |
// enum type needs to implement abstract methods if one of its constants does not supply a body |
484 |
// enum type needs to implement abstract methods if one of its constants does not supply a body |
479 |
TypeDeclaration typeDeclaration = this.referenceContext; |
485 |
TypeDeclaration typeDeclaration = this.referenceContext; |
Lines 519-525
Link Here
|
519 |
} |
525 |
} |
520 |
} |
526 |
} |
521 |
modifiers |= ClassFileConstants.AccFinal; |
527 |
modifiers |= ClassFileConstants.AccFinal; |
522 |
} |
528 |
} |
523 |
} |
529 |
} |
524 |
} else { |
530 |
} else { |
525 |
// detect abnormal cases for classes |
531 |
// detect abnormal cases for classes |