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 net.sourceforge.phpeclipse.internal.compiler.ast;
13 import net.sourceforge.phpdt.internal.compiler.ASTVisitor;
14 import net.sourceforge.phpdt.internal.compiler.lookup.*;
17 public class JavadocReturnStatement extends ReturnStatement {
18 public char[] description;
20 public JavadocReturnStatement(int s, int e, char[] descr) {
22 this.description = descr;
23 this.bits |= InsideJavadoc;
26 public void resolve(BlockScope scope) {
27 MethodScope methodScope = scope.methodScope();
28 MethodBinding methodBinding;
29 TypeBinding methodType =
30 (methodScope.referenceContext instanceof AbstractMethodDeclaration)
31 ? ((methodBinding = ((AbstractMethodDeclaration) methodScope.referenceContext).binding) == null
33 : methodBinding.returnType)
35 if (methodType == null || methodType == VoidBinding) {
36 scope.problemReporter().javadocUnexpectedTag(this.sourceStart, this.sourceEnd);
41 * Redefine to capture javadoc specific signatures
42 * @see net.sourceforge.phpdt.internal.compiler.ast.ASTNode#traverse(net.sourceforge.phpdt.internal.compiler.ASTVisitor, net.sourceforge.phpdt.internal.compiler.lookup.BlockScope)
44 public void traverse(ASTVisitor visitor, BlockScope scope) {
45 visitor.visit(this, scope);
46 visitor.endVisit(this, scope);