List of usage examples for org.eclipse.jdt.core.dom NormalAnnotation NormalAnnotation
NormalAnnotation(AST ast)
From source file:org.eclipse.jdt.core.dom.ASTConverter.java
License:Open Source License
public NormalAnnotation convert(org.eclipse.jdt.internal.compiler.ast.NormalAnnotation annotation) { final NormalAnnotation normalAnnotation = new NormalAnnotation(this.ast); setTypeNameForAnnotation(annotation, normalAnnotation); int start = annotation.sourceStart; int end = annotation.declarationSourceEnd; org.eclipse.jdt.internal.compiler.ast.MemberValuePair[] memberValuePairs = annotation.memberValuePairs; if (memberValuePairs != null) { for (int i = 0, max = memberValuePairs.length; i < max; i++) { MemberValuePair memberValuePair = convert(memberValuePairs[i]); int memberValuePairEnd = memberValuePair.getStartPosition() + memberValuePair.getLength() - 1; if (end == memberValuePairEnd) { normalAnnotation.setFlags(normalAnnotation.getFlags() | ASTNode.RECOVERED); }//from w ww . j a v a2 s.c o m normalAnnotation.values().add(memberValuePair); } } normalAnnotation.setSourceRange(start, end - start + 1); if (this.resolveBindings) { recordNodes(normalAnnotation, annotation); normalAnnotation.resolveAnnotationBinding(); } return normalAnnotation; }