src/share/classes/com/sun/tools/javac/comp/Annotate.java

changeset 1344
73312ec2cf7c
parent 1322
324b98626f58
child 1374
c002fdee76fd
equal deleted inserted replaced
1343:f1e6b361a329 1344:73312ec2cf7c
512 targetContainerType, 512 targetContainerType,
513 valueRetType, 513 valueRetType,
514 expectedType); 514 expectedType);
515 fatalError = true; 515 fatalError = true;
516 } 516 }
517
518 // validate that all other elements of containing type has defaults
519 scope = targetContainerType.tsym.members();
520 error = false;
521 for(Symbol elm : scope.getElements()) {
522 if (elm.name != names.value &&
523 elm.kind == Kinds.MTH &&
524 ((MethodSymbol)elm).defaultValue == null) {
525 log.error(pos,
526 "invalid.containedby.annotation.elem.nondefault",
527 targetContainerType,
528 elm);
529 containerValueSymbol = null;
530 error = true;
531 }
532 }
533 if (error) { 517 if (error) {
534 fatalError = true; 518 fatalError = true;
535 } 519 }
536 520
537 // Explicitly no check for/validity of @ContainerFor. That is 521 // Explicitly no check for/validity of @ContainerFor. That is

mercurial