Skip to content

Commit

Permalink
Rename to visitExecutableAsPatternDeclaration
Browse files Browse the repository at this point in the history
  • Loading branch information
biboudis committed May 13, 2024
1 parent 67f0100 commit b29644e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,15 @@ default R visitRecordComponent(RecordComponentElement e, P p) {
/**
* Visits a pattern declaration executable element.
*
* @implSpec The default implementation visits a {@code
* PatternDeclarationElement} by calling {@code visitUnknown(e, p)}.
* @implSpec The default implementation visits an {@code
* ExecutableElement} by calling {@code visitUnknown(e, p)}.
*
* @param e the element to visit
* @param p a visitor-specified parameter
* @return a visitor-specified result
* @since 23
*/
default R visitPatternDeclaration(ExecutableElement e, P p) {
default R visitExecutableAsPatternDeclaration(ExecutableElement e, P p) {
return visitUnknown(e, p);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ protected AbstractElementVisitorPreview(){
* @return {@inheritDoc ElementVisitor}
*/
@Override
public abstract R visitPatternDeclaration(ExecutableElement e, P p);
public abstract R visitExecutableAsPatternDeclaration(ExecutableElement e, P p);
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import javax.lang.model.element.*;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.ElementVisitor;

import static javax.lang.model.element.ElementKind.*;
import static javax.lang.model.SourceVersion.*;

Expand Down Expand Up @@ -396,7 +396,7 @@ public R visitExecutable(ExecutableElement e, P p) {
return visitExecutableAsStaticInit(e, p);

case PATTERN_DECLARATION:
return visitPatternDeclaration(e, p);
return visitExecutableAsPatternDeclaration(e, p);

default:
throw new AssertionError("Bad kind " + k + " for ExecutableElement" + e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ protected ElementKindVisitorPreview(R defaultValue) {
* @param p a visitor-specified parameter
* @return the result of {@code defaultAction}
*/
public R visitPatternDeclaration(ExecutableElement e, P p) {
public R visitExecutableAsPatternDeclaration(ExecutableElement e, P p) {
return defaultAction(e, p);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ protected ElementScannerPreview(R defaultValue){
* @since N
*/
@Override
public R visitPatternDeclaration(ExecutableElement e, P p) {
public R visitExecutableAsPatternDeclaration(ExecutableElement e, P p) {
return scan(createScanningList(e, e.getBindings()), p);
}

Expand Down

0 comments on commit b29644e

Please sign in to comment.