@Override public boolean visit(AnnotationMethodDeclaration methodDeclaration, ClassScope scope) { MatchLocatorParser.this.patternLocator.match(methodDeclaration, MatchLocatorParser.this.nodeSet); return false; // no local type for annotation type members } }
@Override public boolean visit(TypeDeclaration localTypeDeclaration, BlockScope scope) { MatchLocatorParser.this.patternLocator.match(localTypeDeclaration, MatchLocatorParser.this.nodeSet); return true; } }
@Override public boolean visit(Initializer initializer, MethodScope scope) { MatchLocatorParser.this.patternLocator.match(initializer, MatchLocatorParser.this.nodeSet); return (initializer.bits & ASTNode.HasLocalType) != 0; // continue only if it has local type } @Override
@Override protected void classInstanceCreation(boolean alwaysQualified) { super.classInstanceCreation(alwaysQualified); if (this.patternFineGrain == 0) { this.patternLocator.match(this.expressionStack[this.expressionPtr], this.nodeSet); } else if ((this.patternFineGrain & IJavaSearchConstants.CLASS_INSTANCE_CREATION_TYPE_REFERENCE) != 0) { AllocationExpression allocation = (AllocationExpression) this.expressionStack[this.expressionPtr]; this.patternLocator.match(allocation.type, this.nodeSet); } }
@Override protected void consumeStaticImportOnDemandDeclarationName() { super.consumeStaticImportOnDemandDeclarationName(); if (this.reportImportMatch) { this.patternLocator.match(this.astStack[this.astPtr], this.nodeSet); } } @Override
@Override protected void consumeTypeImportOnDemandDeclarationName() { super.consumeTypeImportOnDemandDeclarationName(); if (this.reportImportMatch) { this.patternLocator.match(this.astStack[this.astPtr], this.nodeSet); } }
@Override protected void consumeCastExpressionWithPrimitiveType() { super.consumeCastExpressionWithPrimitiveType(); if ((this.patternFineGrain & IJavaSearchConstants.CAST_TYPE_REFERENCE) != 0) { CastExpression castExpression = (CastExpression) this.expressionStack[this.expressionPtr]; this.patternLocator.match(castExpression.type, this.nodeSet); } } @Override
@Override protected void consumeCastExpressionWithQualifiedGenericsArray() { super.consumeCastExpressionWithQualifiedGenericsArray(); if ((this.patternFineGrain & IJavaSearchConstants.CAST_TYPE_REFERENCE) != 0) { CastExpression castExpression = (CastExpression) this.expressionStack[this.expressionPtr]; this.patternLocator.match(castExpression.type, this.nodeSet); } } @Override
@Override protected void consumeExplicitConstructorInvocationWithTypeArguments(int flag, int recFlag) { super.consumeExplicitConstructorInvocationWithTypeArguments(flag, recFlag); this.patternLocator.match(this.astStack[this.astPtr], this.nodeSet); } @Override
@Override protected void consumeFormalParameter(boolean isVarArgs) { super.consumeFormalParameter(isVarArgs); this.patternLocator.match((LocalDeclaration) this.astStack[this.astPtr], this.nodeSet); }
@Override protected void consumeInstanceOfExpressionWithName() { super.consumeInstanceOfExpressionWithName(); if ((this.patternFineGrain & IJavaSearchConstants.INSTANCEOF_TYPE_REFERENCE) != 0) { InstanceOfExpression expression = (InstanceOfExpression) this.expressionStack[this.expressionPtr]; this.patternLocator.match(expression.type, this.nodeSet); } } @Override
@Override protected void consumeLambdaExpression() { super.consumeLambdaExpression(); this.patternLocator.match((LambdaExpression) this.expressionStack[this.expressionPtr], this.nodeSet); }
@Override protected void consumeMethodInvocationSuper() { super.consumeMethodInvocationSuper(); if (this.patternFineGrain == 0 || (this.patternFineGrain & IJavaSearchConstants.SUPER_REFERENCE) != 0) { this.patternLocator.match((MessageSend) this.expressionStack[this.expressionPtr], this.nodeSet); } }
@Override protected void consumeTypeParameter1WithExtends() { super.consumeTypeParameter1WithExtends(); if ((this.patternFineGrain & IJavaSearchConstants.TYPE_VARIABLE_BOUND_TYPE_REFERENCE) != 0) { TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr]; this.patternLocator.match(typeParameter.type, this.nodeSet); } }
@Override protected void consumeTypeParameterWithExtendsAndBounds() { super.consumeTypeParameterWithExtendsAndBounds(); if ((this.patternFineGrain & IJavaSearchConstants.TYPE_VARIABLE_BOUND_TYPE_REFERENCE) != 0) { TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr]; this.patternLocator.match(typeParameter.type, this.nodeSet); } }
@Override protected void consumeUnaryExpression(int op, boolean post) { super.consumeUnaryExpression(op, post); this.patternLocator.match(this.expressionStack[this.expressionPtr], this.nodeSet); }
@Override protected void consumeWildcardBounds1Super() { super.consumeWildcardBounds1Super(); if ((this.patternFineGrain & IJavaSearchConstants.WILDCARD_BOUND_TYPE_REFERENCE) != 0) { Wildcard wildcard = (Wildcard) this.genericsStack[this.genericsPtr]; this.patternLocator.match(wildcard.bound, this.nodeSet); } }
@Override protected void consumeWildcardBounds2Super() { super.consumeWildcardBounds2Super(); if ((this.patternFineGrain & IJavaSearchConstants.WILDCARD_BOUND_TYPE_REFERENCE) != 0) { Wildcard wildcard = (Wildcard) this.genericsStack[this.genericsPtr]; this.patternLocator.match(wildcard.bound, this.nodeSet); } }
@Override protected void consumeExplicitConstructorInvocation(int flag, int recFlag) { super.consumeExplicitConstructorInvocation(flag, recFlag); this.patternLocator.match(this.astStack[this.astPtr], this.nodeSet); } @Override
@Override protected void consumeSingleTargetModuleName() { super.consumeSingleTargetModuleName(); setTarget(true); this.patternLocator.match((ModuleReference)this.astStack[this.astPtr], this.nodeSet); setTarget(false); }