Example usage for org.eclipse.jdt.core.dom SingleMemberAnnotation SingleMemberAnnotation

List of usage examples for org.eclipse.jdt.core.dom SingleMemberAnnotation SingleMemberAnnotation

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.dom SingleMemberAnnotation SingleMemberAnnotation.

Prototype

SingleMemberAnnotation(AST ast) 

Source Link

Document

Creates a new unparented normal annotation node owned by the given AST.

Usage

From source file:org.eclipse.jdt.core.dom.ASTConverter.java

License:Open Source License

public SingleMemberAnnotation convert(org.eclipse.jdt.internal.compiler.ast.SingleMemberAnnotation annotation) {
    final SingleMemberAnnotation singleMemberAnnotation = new SingleMemberAnnotation(this.ast);
    setTypeNameForAnnotation(annotation, singleMemberAnnotation);
    singleMemberAnnotation.setValue(convert(annotation.memberValue));
    int start = annotation.sourceStart;
    int end = annotation.declarationSourceEnd;
    singleMemberAnnotation.setSourceRange(start, end - start + 1);
    if (this.resolveBindings) {
        recordNodes(singleMemberAnnotation, annotation);
        singleMemberAnnotation.resolveAnnotationBinding();
    }/*from  w  ww .java 2s .c  o m*/
    return singleMemberAnnotation;
}