List of usage examples for org.eclipse.jdt.internal.compiler.ast JavadocSingleNameReference JavadocSingleNameReference
public JavadocSingleNameReference(char[] source, long pos, int tagStart, int tagEnd)
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);/* ww w. j a v a 2 s .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; }
From source file:org.nabucco.framework.mda.model.java.ast.produce.JavaAstModelProducer.java
License:Open Source License
public JavadocSingleNameReference createJavadocSingleNameReference(String name) throws JavaModelException { return new JavadocSingleNameReference(name.toCharArray(), 0l, 0, 0); }