1 /*******************************************************************************
2 * Copyright (c) 2000, 2004 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package org.eclipse.jdt.internal.compiler.ast;
13 import org.eclipse.jdt.internal.compiler.ASTVisitor;
14 import org.eclipse.jdt.internal.compiler.lookup.*;
16 public class JavadocSingleNameReference extends SingleNameReference {
18 public int tagSourceStart, tagSourceEnd;
20 public JavadocSingleNameReference(char[] source, long pos, int tagStart, int tagEnd) {
22 this.tagSourceStart = tagStart;
23 this.tagSourceEnd = tagEnd;
24 this.bits |= InsideJavadoc;
27 public void resolve(BlockScope scope) {
32 * Resolve without warnings
34 public void resolve(BlockScope scope, boolean warn) {
36 LocalVariableBinding variableBinding = scope.findVariable(this.token);
37 if (variableBinding != null && variableBinding.isValidBinding() && variableBinding.isArgument) {
38 this.binding = variableBinding;
43 MethodScope methScope = (MethodScope) scope;
44 scope.problemReporter().javadocUndeclaredParamTagName(this.token, this.sourceStart, this.sourceEnd, methScope.referenceMethod().modifiers);
47 scope.problemReporter().javadocUndeclaredParamTagName(this.token, this.sourceStart, this.sourceEnd, -1);
53 * Redefine to capture javadoc specific signatures
54 * @see org.eclipse.jdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
56 public void traverse(ASTVisitor visitor, BlockScope scope) {
57 visitor.visit(this, scope);
58 visitor.endVisit(this, scope);