Javadoc parse(String rawInput, int from, int to) { char[] rawContent; rawContent = new char[to + GENERIC_JAVA_CLASS_SUFFIX.length]; Arrays.fill(rawContent, 0, from, ' '); System.arraycopy(rawInput.substring(from, to).toCharArray(), 0, rawContent, from, to - from); // Eclipse crashes if there's no character following the javadoc. System.arraycopy(GENERIC_JAVA_CLASS_SUFFIX, 0, rawContent, to, GENERIC_JAVA_CLASS_SUFFIX.length); this.sourceLevel = ClassFileConstants.JDK1_6; this.scanner.setSource(rawContent); this.source = rawContent; this.javadocStart = from; this.javadocEnd = to; this.reportProblems = true; this.docComment = new Javadoc(this.javadocStart, this.javadocEnd); commentParse(); this.docComment.valuePositions = -1; this.docComment.sourceEnd--; return docComment; } }
public StringBuffer printStatement(int indent, StringBuffer output) { if (this.javadoc != null) { this.javadoc.print(indent, output); } return super.printStatement(indent, output); }
public StringBuffer print(int indent, StringBuffer output) { printIndent(indent, output).append("/**\n"); //$NON-NLS-1$ if (this.paramReferences != null) { for (int i = 0, length = this.paramReferences.length; i < length; i++) { printIndent(indent + 1, output).append(" * @param "); //$NON-NLS-1$ this.paramReferences[i].print(indent, output).append('\n'); printIndent(indent + 1, output).append(" * @param <"); //$NON-NLS-1$ this.paramTypeParameters[i].print(indent, output).append(">\n"); //$NON-NLS-1$ printIndent(indent + 1, output).append(" * @"); //$NON-NLS-1$ this.returnStatement.print(indent, output).append('\n'); printIndent(indent + 1, output).append(" * @throws "); //$NON-NLS-1$ this.exceptionReferences[i].print(indent, output).append('\n'); printIndent(indent + 1, output).append(" * @see "); //$NON-NLS-1$ this.seeReferences[i].print(indent, output).append('\n'); printIndent(indent, output).append(" */\n"); //$NON-NLS-1$ return output;
resolveReference(this.seeReferences[i], methScope); resolveParamTags(methScope, reportMissing, compilerOptions.reportUnusedParameterIncludeDocCommentReference /* considerParamRefAsUsage*/); resolveTypeParameterTags(methScope, reportMissing); resolveThrowsTags(methScope, reportMissing);
scope.problemReporter().javadocUnexpectedTag(param.tagSourceStart, param.tagSourceEnd); resolveTypeParameterTags(scope, true); resolveReference(this.seeReferences[i], scope);
/** * Resolve completion node if not null and throw exception to let clients know * that it has been found. * * @throws CompletionNodeFound */ @Override public void resolve(MethodScope scope) { super.resolve(scope); internalResolve(scope); }
public void traverse(ASTVisitor visitor, MethodScope scope) { if (visitor.visit(this, scope)) { if (this.javadoc != null) { this.javadoc.traverse(visitor, scope); } if (this.annotations != null) { int annotationsLength = this.annotations.length; for (int i = 0; i < annotationsLength; i++) this.annotations[i].traverse(visitor, scope); } if (this.type != null) { this.type.traverse(visitor, scope); } if (this.initialization != null) this.initialization.traverse(visitor, scope); } visitor.endVisit(this, scope); } }
if (!canBeSeen(scope.problemReporter().options.reportInvalidJavadocTagsVisibility, modifiers)) { scope.problemReporter().javadocHiddenReference(typeReference.sourceStart, reference.sourceEnd, scope, modifiers); return; if (!canBeSeen(scope.problemReporter().options.reportInvalidJavadocTagsVisibility, resolvedType.modifiers)) { scope.problemReporter().javadocHiddenReference(typeReference.sourceStart, typeReference.sourceEnd, scope, resolvedType.modifiers); return;
resolveReference(this.seeReferences[i], methScope); resolveParamTags(methScope, reportMissing, compilerOptions.reportUnusedParameterIncludeDocCommentReference /* considerParamRefAsUsage*/); resolveTypeParameterTags(methScope, reportMissing && compilerOptions.reportMissingJavadocTagsMethodTypeParameters); resolveThrowsTags(methScope, reportMissing);
scope.problemReporter().javadocUnexpectedTag(param.tagSourceStart, param.tagSourceEnd); resolveTypeParameterTags(scope, true); resolveReference(this.seeReferences[i], scope);
/** * Resolve completion node if not null and throw exception to let clients know * that it has been found. * * @throws CompletionNodeFound */ public void resolve(ClassScope scope) { super.resolve(scope); internalResolve(scope); }
public void traverse(ASTVisitor visitor, MethodScope scope) { if (visitor.visit(this, scope)) { if (this.javadoc != null) { this.javadoc.traverse(visitor, scope); } if (this.annotations != null) { int annotationsLength = this.annotations.length; for (int i = 0; i < annotationsLength; i++) this.annotations[i].traverse(visitor, scope); } if (this.type != null) { this.type.traverse(visitor, scope); } if (this.initialization != null) this.initialization.traverse(visitor, scope); } visitor.endVisit(this, scope); } }
if (!canBeSeen(scope.problemReporter().options.reportInvalidJavadocTagsVisibility, modifiers)) { scope.problemReporter().javadocHiddenReference(typeReference.sourceStart, reference.sourceEnd, scope, modifiers); return; if (!canBeSeen(scope.problemReporter().options.reportInvalidJavadocTagsVisibility, resolvedType.modifiers)) { scope.problemReporter().javadocHiddenReference(typeReference.sourceStart, typeReference.sourceEnd, scope, resolvedType.modifiers); return;
resolveReference(this.seeReferences[i], methScope); resolveParamTags(methScope, reportMissing, compilerOptions.reportUnusedParameterIncludeDocCommentReference /* considerParamRefAsUsage*/); resolveTypeParameterTags(methScope, reportMissing && compilerOptions.reportMissingJavadocTagsMethodTypeParameters); resolveThrowsTags(methScope, reportMissing);
scope.problemReporter().javadocUnexpectedTag(param.tagSourceStart, param.tagSourceEnd); resolveTypeParameterTags(scope, true); resolveReference(this.seeReferences[i], scope);
public StringBuffer printStatement(int indent, StringBuffer output) { if (this.javadoc != null) { this.javadoc.print(indent, output); } return super.printStatement(indent, output); }
/** * Resolve completion node if not null and throw exception to let clients know * that it has been found. * * @throws CompletionNodeFound */ public void resolve(MethodScope scope) { super.resolve(scope); internalResolve(scope); }