Lines 433-438
Link Here
|
433 |
*/ |
433 |
*/ |
434 |
public Object getDefaultValue() { |
434 |
public Object getDefaultValue() { |
435 |
MethodBinding originalMethod = this.original(); |
435 |
MethodBinding originalMethod = this.original(); |
|
|
436 |
if ((originalMethod.tagBits & TagBits.DefaultValueResolved) == 0) { |
437 |
//The method has not been yet type checked. |
438 |
//It also means that the method is not coming from a class that |
439 |
//has already been compiled. It can only be from a class within |
440 |
//compilation units to process. Thus the method is NOT from a BinaryTypeBinbing |
441 |
if (originalMethod.declaringClass instanceof SourceTypeBinding) { |
442 |
SourceTypeBinding sourceType = (SourceTypeBinding) originalMethod.declaringClass; |
443 |
if (sourceType.scope != null) { |
444 |
TypeDeclaration typeDecl = sourceType.scope.referenceContext; |
445 |
AbstractMethodDeclaration methodDeclaration = typeDecl.declarationOf(originalMethod); |
446 |
methodDeclaration.resolve(typeDecl.scope); |
447 |
} |
448 |
} |
449 |
originalMethod.tagBits |= TagBits.DefaultValueResolved; |
450 |
} |
436 |
AnnotationHolder holder = originalMethod.declaringClass.retrieveAnnotationHolder(originalMethod, true); |
451 |
AnnotationHolder holder = originalMethod.declaringClass.retrieveAnnotationHolder(originalMethod, true); |
437 |
return holder == null ? null : holder.getDefaultValue(); |
452 |
return holder == null ? null : holder.getDefaultValue(); |
438 |
} |
453 |
} |
Lines 631-636
Link Here
|
631 |
this.declaringClass.storeAnnotationHolder(this, AnnotationHolder.storeAnnotations(annotations, parameterAnnotations, defaultValue)); |
646 |
this.declaringClass.storeAnnotationHolder(this, AnnotationHolder.storeAnnotations(annotations, parameterAnnotations, defaultValue)); |
632 |
} |
647 |
} |
633 |
public void setDefaultValue(Object defaultValue) { |
648 |
public void setDefaultValue(Object defaultValue) { |
|
|
649 |
MethodBinding originalMethod = this.original(); |
650 |
if ((originalMethod.tagBits & TagBits.DefaultValueResolved) != 0) { |
651 |
return; |
652 |
} |
634 |
AnnotationHolder holder = this.declaringClass.retrieveAnnotationHolder(this, false); |
653 |
AnnotationHolder holder = this.declaringClass.retrieveAnnotationHolder(this, false); |
635 |
if (holder == null) |
654 |
if (holder == null) |
636 |
setAnnotations(null, null, defaultValue); |
655 |
setAnnotations(null, null, defaultValue); |