Example usage for org.eclipse.jdt.internal.compiler.ast JavadocReturnStatement JavadocReturnStatement

List of usage examples for org.eclipse.jdt.internal.compiler.ast JavadocReturnStatement JavadocReturnStatement

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.ast JavadocReturnStatement JavadocReturnStatement.

Prototype

public JavadocReturnStatement(int s, int e) 

Source Link

Usage

From source file:lombok.eclipse.handlers.ast.EclipseASTMaker.java

License:Open Source License

@Override
public ASTNode visitJavaDoc(final lombok.ast.JavaDoc node, final Void p) {
    final Javadoc javadoc = new Javadoc(0, 0);
    setGeneratedByAndCopyPos(javadoc, source, posHintOf(node));
    // TODO node.getMessage()
    final List<JavadocSingleNameReference> argumentReferences = new ArrayList<JavadocSingleNameReference>();
    for (Map.Entry<String, String> argumentReference : node.getArgumentReferences().entrySet()) {
        final JavadocSingleNameReference ref = new JavadocSingleNameReference(
                (argumentReference.getKey()).toCharArray(), 0, 0, 0); // TODO argumentReference.getValue()
        setGeneratedByAndCopyPos(ref, source, posHintOf(node));
        argumentReferences.add(ref);//from   ww  w .  j a v a  2s . c  o  m
    }
    javadoc.paramReferences = toArray(argumentReferences, new JavadocSingleNameReference[0]);
    final List<JavadocSingleTypeReference> paramTypeReferences = new ArrayList<JavadocSingleTypeReference>();
    for (Map.Entry<String, String> paramTypeReference : node.getParamTypeReferences().entrySet()) {
        final JavadocSingleTypeReference ref = new JavadocSingleTypeReference(
                (paramTypeReference.getKey()).toCharArray(), 0, 0, 0); // TODO paramTypeReference.getValue()
        setGeneratedByAndCopyPos(ref, source, posHintOf(node));
        paramTypeReferences.add(ref);
    }
    javadoc.paramTypeParameters = toArray(paramTypeReferences, new JavadocSingleTypeReference[0]);
    final List<TypeReference> exceptionReferences = new ArrayList<TypeReference>();
    for (Map.Entry<lombok.ast.TypeRef, String> exceptionReference : node.getExceptionReferences().entrySet()) {
        final TypeReference ref = build(exceptionReference.getKey()); // TODO exceptionReference.getValue()
        setGeneratedByAndCopyPos(ref, source, posHintOf(node));
        exceptionReferences.add(ref);
    }
    javadoc.exceptionReferences = toArray(exceptionReferences, new TypeReference[0]);
    if (node.getReturnMessage() != null)
        javadoc.returnStatement = new JavadocReturnStatement(0, 0); // TODO node.getReturnStatement()
    return javadoc;
}