Lines 308-323
Link Here
|
308 |
AnnotationMethodDeclaration annotationMethodDeclaration = new AnnotationMethodDeclaration(compilationResult); |
308 |
AnnotationMethodDeclaration annotationMethodDeclaration = new AnnotationMethodDeclaration(compilationResult); |
309 |
|
309 |
|
310 |
/* conversion of default value */ |
310 |
/* conversion of default value */ |
|
|
311 |
SourceAnnotationMethodInfo annotationMethodInfo = (SourceAnnotationMethodInfo) methodInfo; |
312 |
boolean hasDefaultValue = annotationMethodInfo.defaultValueStart != -1 || annotationMethodInfo.defaultValueEnd != -1; |
311 |
if ((this.flags & FIELD_INITIALIZATION) != 0) { |
313 |
if ((this.flags & FIELD_INITIALIZATION) != 0) { |
312 |
char[] defaultValueSource = ((SourceAnnotationMethodInfo) methodInfo).getDefaultValueSource(getSource()); |
314 |
if (hasDefaultValue) { |
313 |
if (defaultValueSource != null) { |
315 |
char[] defaultValueSource = CharOperation.subarray(getSource(), annotationMethodInfo.defaultValueStart, annotationMethodInfo.defaultValueEnd+1); |
314 |
Expression expression = parseMemberValue(defaultValueSource); |
316 |
Expression expression = parseMemberValue(defaultValueSource); |
315 |
if (expression != null) { |
317 |
if (expression != null) { |
316 |
annotationMethodDeclaration.defaultValue = expression; |
318 |
annotationMethodDeclaration.defaultValue = expression; |
317 |
modifiers |= ClassFileConstants.AccAnnotationDefault; |
|
|
318 |
} |
319 |
} |
319 |
} |
320 |
} |
320 |
} |
321 |
} |
|
|
322 |
if (hasDefaultValue) |
323 |
modifiers |= ClassFileConstants.AccAnnotationDefault; |
321 |
decl = annotationMethodDeclaration; |
324 |
decl = annotationMethodDeclaration; |
322 |
} else { |
325 |
} else { |
323 |
decl = new MethodDeclaration(compilationResult); |
326 |
decl = new MethodDeclaration(compilationResult); |