private void parseAnnotationSection(AElement member, AnnotationSection sec) throws IOException, ParseException {
// FILL
while (inData()) {
String annoTypeName = parseAnnotationHead();
RetentionPolicy retention = sec.retention;
AnnotationBuilder ab = AnnotationFactory.saf.beginAnnotation(annoTypeName, Annotations.getRetentionPolicyMetaAnnotationSet(retention));
if (ab == null) {
// don't care about the result
// but need to skip over it anyway
parseAnnotationBody(
AnnotationFactory.saf.beginAnnotation(annoTypeName, Annotations.noAnnotations),
SECTION_DATA_PREFIX);
} else {
// Wrap it in a TLA with the appropriate retention policy
Annotation a = parseAnnotationBody(ab, SECTION_DATA_PREFIX);
// Now we need to parse the location information to determine
// which element gets the annotation.
AElement annoMember = chooseSubElement(member, sec);
annoMember.tlAnnotationsHere.add(a);
}
}
}
JavapParser.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:annotation-tools
作者:
评论列表
文章目录