Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 2011 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM Corporation - initial API and implementation Stephan Herrmann <stephan@cs.tu-berlin.de> - Contribution for bug 185682 - Increment/decrement operators mark local variables as read /
 
 package org.eclipse.jdt.internal.compiler.ast;
 
 
 public class JavadocFieldReference extends FieldReference {
 
 	public int tagSourceStarttagSourceEnd;
 	public int tagValue;
 
 	public JavadocFieldReference(char[] sourcelong pos) {
 		super(sourcepos);
 		this. |= ;
 	}
 
 	/*
 	public Binding getBinding() {
 		if (this.methodBinding != null) {
 			return this.methodBinding;
 		}
 		return this.binding;
 	}
 	*/
 
 	/*
 	 * Resolves type on a Block or Class scope.
 	 */
 	protected TypeBinding internalResolveType(Scope scope) {
 
 		if (this. == null) {
 		} else if (scope.kind == .) {
 		} else {
 		}
 		if (this. == null) {
 			return null;
 		}
 
 		Binding fieldBinding = (this. != null && this..isThis())
 			? scope.classScope().getBinding(this.this. & thistrue /*resolve*/)
 			: scope.getField(this.this.this);
 		if (!fieldBinding.isValidBinding()) {
 			// implicit lookup may discover issues due to static/constructor contexts. javadoc must be resilient
 			switch (fieldBinding.problemId()) {
 					FieldBinding closestMatch = ((ProblemFieldBinding)fieldBinding).;
 					if (closestMatch != null) {
 						fieldBinding = closestMatch// ignore problem if can reach target field through it
 					}
 			}
 		}
 		// When there's no valid field binding, try to resolve possible method reference without parenthesis
 		if (!fieldBinding.isValidBinding() || !(fieldBinding instanceof FieldBinding)) {
 			if (this.. instanceof ProblemReferenceBinding) {
 				// problem already got signaled on receiver, do not report secondary problem
 				return null;
 			}
 			if (this. instanceof ReferenceBinding) {
 				char[] selector = this.;
 				MethodBinding possibleMethod = null;
 				if (CharOperation.equals(this..sourceName(), selector)) {
 					possibleMethod = scope.getConstructor(refBinding.this);
 				} else {
 					possibleMethod = this..isThis()
 						? scope.getImplicitMethod(selector.this)
 						: scope.getMethod(refBindingselector.this);
 				}
 				if (possibleMethod.isValidBinding()) {
 					this. = possibleMethod;
 				} else {
 					ProblemMethodBinding problemMethodBinding = (ProblemMethodBindingpossibleMethod;
 					if (problemMethodBinding.closestMatch == null) {
 						if (fieldBinding.isValidBinding()) {
 							// When the binding is not on a field (e.g. local variable), we need to create a problem field binding to report the correct problem
 							// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=254825
 							fieldBinding = new ProblemFieldBinding(refBindingfieldBinding.readableName(), .);
 						}
 						scope.problemReporter().javadocInvalidField(thisfieldBindingthis.scope.getDeclarationModifiers());
 					} else {
						this. = problemMethodBinding.closestMatch;
					}
				}
			}
			return null;
		}
		this. = (FieldBindingfieldBinding;
		if (isFieldUseDeprecated(this.scopethis.)) {
		}
		return this. = this..;
	}
	public boolean isSuperAccess() {
		return (this. & .) != 0;
	}
	public StringBuffer printExpression(int indentStringBuffer output) {
		if (this. != null) {
			this..printExpression(0, output);
		}
		output.append('#').append(this.);
		return output;
	}
		return internalResolveType(scope);
	}
		return internalResolveType(scope);
	}
	/* (non-Javadoc)
	 * Redefine to capture javadoc specific signatures
	 * @see org.eclipse.jdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
	 */
	public void traverse(ASTVisitor visitorBlockScope scope) {
		if (visitor.visit(thisscope)) {
			if (this. != null) {
				this..traverse(visitorscope);
			}
		}
		visitor.endVisit(thisscope);
	}
	public void traverse(ASTVisitor visitorClassScope scope) {
		if (visitor.visit(thisscope)) {
			if (this. != null) {
				this..traverse(visitorscope);
			}
		}
		visitor.endVisit(thisscope);
	}
New to GrepCode? Check out our FAQ X