/** * @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.QualifiedThisReference, org.eclipse.jdt.internal.compiler.lookup.BlockScope) */ public boolean visit( QualifiedThisReference qualifiedThisReference, BlockScope scope) { final int numberOfParens = (qualifiedThisReference.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT; if (numberOfParens > 0) { manageOpeningParenthesizedExpression(qualifiedThisReference, numberOfParens); } qualifiedThisReference.qualification.traverse(this, scope); this.scribe.printNextToken(TerminalTokens.TokenNameDOT); this.scribe.printNextToken(TerminalTokens.TokenNamethis); if (numberOfParens > 0) { manageClosingParenthesizedExpression(qualifiedThisReference, numberOfParens); } return false; }
protected void consumePrimaryNoNewArrayNameThis() { // PrimaryNoNewArray ::= Name '.' 'this' // handle type arguments pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]); pushOnGenericsLengthStack(0); // handle type arguments // javac does not accept annotations here anywhere ... TypeReference typeReference = getTypeReference(0); rejectIllegalTypeAnnotations(typeReference); pushOnExpressionStack( new QualifiedThisReference( typeReference, this.intStack[this.intPtr--], this.endPosition)); }
@Override public void endVisit(QualifiedSuperReference x, BlockScope scope) { try { // Oddly enough, super refs can be modeled as this refs, because // whatever expression they qualify has already been resolved. endVisit((QualifiedThisReference) x, scope); } catch (Throwable e) { throw translateException(x, e); } }
@Override public void endVisit(QualifiedThisReference x, BlockScope scope) { try { SourceInfo info = makeSourceInfo(x); ReferenceBinding targetType = (ReferenceBinding) x.qualification.resolvedType; push(makeThisReference(info, targetType, true, scope)); } catch (Throwable e) { throw translateException(x, e); } }
@Override public boolean visit(QualifiedThisReference node, BlockScope scope) { fixPositions(setGeneratedBy(node, source)); return super.visit(node, scope); }
@Override public boolean visit(QualifiedThisReference node, ClassScope scope) { fixPositions(setGeneratedBy(node, source)); return super.visit(node, scope); }
public boolean visit( QualifiedThisReference qualifiedThisReference, BlockScope scope) { addRealFragment(qualifiedThisReference); return false; }
@Override public boolean visit(QualifiedThisReference node, BlockScope scope) { setGeneratedBy(node, source); applyOffsetExpression(node); return super.visit(node, scope); }
@Override public boolean visit(QualifiedThisReference node, ClassScope scope) { setGeneratedBy(node, source); applyOffsetExpression(node); return super.visit(node, scope); }