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[] name, int startPosition, int endPosition) {
21 super(name, (((long) startPosition) << 32) + endPosition);
22 this.bits |= InsideJavadoc;
25 public void resolve(BlockScope scope) {
30 * Resolve without warnings
32 public void resolve(BlockScope scope, boolean warn) {
34 LocalVariableBinding variableBinding = scope.findVariable(this.token);
35 if (variableBinding != null && variableBinding.isValidBinding() && variableBinding.isArgument) {
36 this.binding = variableBinding;
41 MethodScope methScope = (MethodScope) scope;
42 scope.problemReporter().javadocInvalidParamName(this, methScope.referenceMethod().modifiers);
45 scope.problemReporter().javadocInvalidParamName(this, -1);
51 * Redefine to capture javadoc specific signatures
52 * @see org.eclipse.jdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
54 public void traverse(ASTVisitor visitor, BlockScope scope) {
55 visitor.visit(this, scope);
56 visitor.endVisit(this, scope);