From 53a41619641bac555f5fbefc138b4c03bbd0fb18 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 13 Jul 2026 20:48:12 +0100 Subject: Rename JavaMethodKind to JavaMemberKind --- .../compiler/output/lang/java/JavaWriterTests.java | 28 +++++++++++----------- .../java/ast/JavaMethodDeclarationMatcher.java | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'src/test/java/org/zwobble') diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/JavaWriterTests.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/JavaWriterTests.java index 79e8aa9..15c294f 100644 --- a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/JavaWriterTests.java +++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/JavaWriterTests.java @@ -123,14 +123,14 @@ public class JavaWriterTests { JavaMethodDeclaration.arbitrary() .withName(JavaIdentifier.of("a")) .withVisibility(JavaVisibility.PUBLIC) - .withKind(JavaMethodKind.INSTANCE) + .withKind(JavaMemberKind.INSTANCE) .withReturnType(JavaTypeRef.VOID) .withBody(JavaBlock.EMPTY) .build(), JavaMethodDeclaration.arbitrary() .withName(JavaIdentifier.of("b")) .withVisibility(JavaVisibility.PUBLIC) - .withKind(JavaMethodKind.INSTANCE) + .withKind(JavaMemberKind.INSTANCE) .withReturnType(JavaTypeRef.VOID) .withBody(JavaBlock.EMPTY) .build() @@ -331,14 +331,14 @@ public class JavaWriterTests { JavaMethodDeclaration.arbitrary() .withName(JavaIdentifier.of("a")) .withVisibility(JavaVisibility.PUBLIC) - .withKind(JavaMethodKind.STATIC) + .withKind(JavaMemberKind.STATIC) .withReturnType(JavaTypeRef.VOID) .withBody(JavaBlock.EMPTY) .build(), JavaMethodDeclaration.arbitrary() .withName(JavaIdentifier.of("b")) .withVisibility(JavaVisibility.PUBLIC) - .withKind(JavaMethodKind.STATIC) + .withKind(JavaMemberKind.STATIC) .withReturnType(JavaTypeRef.VOID) .withBody(JavaBlock.EMPTY) .build() @@ -460,14 +460,14 @@ public class JavaWriterTests { JavaMethodDeclaration.arbitrary() .withName(JavaIdentifier.of("a")) .withVisibility(JavaVisibility.PUBLIC) - .withKind(JavaMethodKind.INSTANCE) + .withKind(JavaMemberKind.INSTANCE) .withReturnType(JavaTypeRef.VOID) .withBody(JavaBlock.EMPTY) .build(), JavaMethodDeclaration.arbitrary() .withName(JavaIdentifier.of("b")) .withVisibility(JavaVisibility.PUBLIC) - .withKind(JavaMethodKind.INSTANCE) + .withKind(JavaMemberKind.INSTANCE) .withReturnType(JavaTypeRef.VOID) .withBody(JavaBlock.EMPTY) .build() @@ -608,7 +608,7 @@ public class JavaWriterTests { var java = JavaMethodDeclaration.arbitrary() .withName(JavaIdentifier.of("a")) .withVisibility(JavaVisibility.PUBLIC) - .withKind(JavaMethodKind.INSTANCE) + .withKind(JavaMemberKind.INSTANCE) .withReturnType(JavaTypeRef.VOID) .withBody(Optional.empty()) .build(); @@ -625,7 +625,7 @@ public class JavaWriterTests { var java = JavaMethodDeclaration.arbitrary() .withName(JavaIdentifier.of("a")) .withVisibility(JavaVisibility.PUBLIC) - .withKind(JavaMethodKind.INSTANCE) + .withKind(JavaMemberKind.INSTANCE) .withReturnType(JavaTypeRef.VOID) .withBody(JavaBlock.EMPTY) .build(); @@ -643,7 +643,7 @@ public class JavaWriterTests { var java = JavaMethodDeclaration.arbitrary() .withName(JavaIdentifier.of("a")) .withVisibility(JavaVisibility.PUBLIC) - .withKind(JavaMethodKind.INSTANCE) + .withKind(JavaMemberKind.INSTANCE) .withReturnType(JavaTypeRef.VOID) .withBody(JavaBlock.EMPTY) .build(); @@ -661,7 +661,7 @@ public class JavaWriterTests { var java = JavaMethodDeclaration.arbitrary() .withName(JavaIdentifier.of("a")) .withVisibility(JavaVisibility.PRIVATE) - .withKind(JavaMethodKind.INSTANCE) + .withKind(JavaMemberKind.INSTANCE) .withReturnType(JavaTypeRef.VOID) .withBody(JavaBlock.EMPTY) .build(); @@ -679,7 +679,7 @@ public class JavaWriterTests { var java = JavaMethodDeclaration.arbitrary() .withName(JavaIdentifier.of("a")) .withVisibility(JavaVisibility.PUBLIC) - .withKind(JavaMethodKind.STATIC) + .withKind(JavaMemberKind.STATIC) .withReturnType(JavaTypeRef.VOID) .withBody(JavaBlock.EMPTY) .build(); @@ -697,7 +697,7 @@ public class JavaWriterTests { var java = JavaMethodDeclaration.arbitrary() .withName(JavaIdentifier.of("a")) .withVisibility(JavaVisibility.PUBLIC) - .withKind(JavaMethodKind.INSTANCE) + .withKind(JavaMemberKind.INSTANCE) .withReturnType(JavaTypeRef.VOID) .withParams(List.of( new JavaParam(JavaTypeRef.INT, JavaIdentifier.of("b")), @@ -719,7 +719,7 @@ public class JavaWriterTests { var java = JavaMethodDeclaration.arbitrary() .withName(JavaIdentifier.of("a")) .withVisibility(JavaVisibility.PUBLIC) - .withKind(JavaMethodKind.INSTANCE) + .withKind(JavaMemberKind.INSTANCE) .withReturnType(JavaTypeRef.VOID) .withThrows(List.of( JavaTypeRef.topLevel(JavaPackageName.of("java", "io"), JavaIdentifier.of("IOException")), @@ -741,7 +741,7 @@ public class JavaWriterTests { var java = JavaMethodDeclaration.arbitrary() .withName(JavaIdentifier.of("a")) .withVisibility(JavaVisibility.PUBLIC) - .withKind(JavaMethodKind.INSTANCE) + .withKind(JavaMemberKind.INSTANCE) .withReturnType(JavaTypeRef.INT) .withBody(new JavaBlock(List.of( new JavaReturn(new JavaIntegerLiteral(42)) diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodDeclarationMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodDeclarationMatcher.java index 08633d6..4ad006d 100644 --- a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodDeclarationMatcher.java +++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodDeclarationMatcher.java @@ -40,7 +40,7 @@ public class JavaMethodDeclarationMatcher implements org.zwobble.precisely.Match return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher(submatchers); } - public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher withKind(org.zwobble.precisely.Matcher kind) { + public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher withKind(org.zwobble.precisely.Matcher kind) { var submatchers = new java.util.ArrayList>(this.submatchers); submatchers.add(org.zwobble.precisely.Matchers.has("kind", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration::kind, kind)); return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher(submatchers); -- cgit v1.2.3