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