Example usage for org.eclipse.jdt.core.dom EnumConstantDeclaration setJavadoc

List of usage examples for org.eclipse.jdt.core.dom EnumConstantDeclaration setJavadoc

Introduction

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

Prototype

public void setJavadoc(Javadoc docComment) 

Source Link

Document

Sets or clears the doc comment node.

Usage

From source file:org.whole.lang.java.util.JDTTransformerVisitor.java

License:Open Source License

@Override
public boolean visit(EnumConstantDeclaration node) {
    org.whole.lang.java.model.EnumConstantDeclaration enumConstantDeclaration;
    appendBodyDeclaration(/*w w w.j  av  a 2 s .  co m*/
            enumConstantDeclaration = createResolver(JavaEntityDescriptorEnum.EnumConstantDeclaration));

    if (acceptChild(node.getJavadoc()))
        enumConstantDeclaration.setJavadoc(this.javadoc);

    List<?> modifiers = node.modifiers();
    if (!modifiers.isEmpty()) {
        enumConstantDeclaration.setModifiers(lf.create(JavaEntityDescriptorEnum.ExtendedModifiers));
        setExtendedModifiers(enumConstantDeclaration.getModifiers(), modifiers);
    }
    if (acceptChild(node.getName()))
        enumConstantDeclaration.setName((org.whole.lang.java.model.SimpleName) this.name);

    Iterator<?> i = node.arguments().iterator();
    while (i.hasNext()) {
        ((ASTNode) i.next()).accept(this);
        enumConstantDeclaration.getArguments().wAdd(this.exp);
    }

    if (acceptChild(node.getAnonymousClassDeclaration()))
        enumConstantDeclaration.setAnonymousClassDeclaration(this.anonymousClassDeclaration);

    return false;
}