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 --- hobgoblin/src/output/lang/java/ast.hob | 4 ++-- .../JavaPreciselyMatchersGenerator.java | 10 ++++---- .../javatransient0/JavaTransient0Generator.java | 4 ++-- .../generators/javatypes/JavaTypesGenerator.java | 20 ++++++++-------- .../output/lang/java/ast/JavaMemberKind.java | 14 +++++++++++ .../lang/java/ast/JavaMethodDeclaration.java | 10 ++++---- .../output/lang/java/ast/JavaMethodKind.java | 14 ----------- .../compiler/output/lang/java/JavaWriterTests.java | 28 +++++++++++----------- .../java/ast/JavaMethodDeclarationMatcher.java | 2 +- 9 files changed, 53 insertions(+), 53 deletions(-) create mode 100644 src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMemberKind.java delete mode 100644 src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodKind.java diff --git a/hobgoblin/src/output/lang/java/ast.hob b/hobgoblin/src/output/lang/java/ast.hob index 69bd3d8..65397a9 100644 --- a/hobgoblin/src/output/lang/java/ast.hob +++ b/hobgoblin/src/output/lang/java/ast.hob @@ -88,7 +88,7 @@ struct JavaFieldDeclaration { struct JavaMethodDeclaration { field name: JavaIdentifier; field visibility: JavaVisibility; - field kind: JavaMethodKind; + field kind: JavaMemberKind; field returnType: JavaTypeRef; field params: List[JavaParam]; field throws: List[JavaTypeRef]; @@ -97,7 +97,7 @@ struct JavaMethodDeclaration { // == Methods == -enum JavaMethodKind { +enum JavaMemberKind { variant static; variant instance; } diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javapreciselymatchers/JavaPreciselyMatchersGenerator.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javapreciselymatchers/JavaPreciselyMatchersGenerator.java index 252f421..e4d2e95 100644 --- a/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javapreciselymatchers/JavaPreciselyMatchersGenerator.java +++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javapreciselymatchers/JavaPreciselyMatchersGenerator.java @@ -103,7 +103,7 @@ public class JavaPreciselyMatchersGenerator implements Generator { new JavaMethodDeclaration( this.javaGenerator.generateFieldName("is" + lowerCamelCaseToUpperCamelCase(structDefinition.name())), JavaVisibility.PUBLIC, - JavaMethodKind.STATIC, + JavaMemberKind.STATIC, javaMatcherTypeRef, List.of(), List.of(), @@ -143,7 +143,7 @@ public class JavaPreciselyMatchersGenerator implements Generator { new JavaMethodDeclaration( JavaIdentifier.of("match"), JavaVisibility.PUBLIC, - JavaMethodKind.INSTANCE, + JavaMemberKind.INSTANCE, MATCH_RESULT_REF, List.of(new JavaParam(JavaTypeRef.OBJECT, JavaIdentifier.of("actual"))), List.of(), @@ -160,7 +160,7 @@ public class JavaPreciselyMatchersGenerator implements Generator { new JavaMethodDeclaration( JavaIdentifier.of("describe"), JavaVisibility.PUBLIC, - JavaMethodKind.INSTANCE, + JavaMemberKind.INSTANCE, TEXT_TREE_REF, List.of(), List.of(), @@ -177,7 +177,7 @@ public class JavaPreciselyMatchersGenerator implements Generator { new JavaMethodDeclaration( JavaIdentifier.of("toMatcher"), JavaVisibility.PRIVATE, - JavaMethodKind.INSTANCE, + JavaMemberKind.INSTANCE, genericMatcherRef(JavaTypeRef.OBJECT), List.of(), List.of(), @@ -203,7 +203,7 @@ public class JavaPreciselyMatchersGenerator implements Generator { methods.add(new JavaMethodDeclaration( this.javaGenerator.generateFieldName("with" + lowerCamelCaseToUpperCamelCase(field.name())), JavaVisibility.PUBLIC, - JavaMethodKind.INSTANCE, + JavaMemberKind.INSTANCE, javaMatcherTypeRef, List.of( new JavaParam(genericMatcherRef(JavaTypeArg.superType(javaFieldTypeRef)), javaFieldName) diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javatransient0/JavaTransient0Generator.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javatransient0/JavaTransient0Generator.java index b1533d2..17eb68f 100644 --- a/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javatransient0/JavaTransient0Generator.java +++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javatransient0/JavaTransient0Generator.java @@ -504,7 +504,7 @@ public class JavaTransient0Generator implements Generator { return new JavaMethodDeclaration( encodeMethodName(type), JavaVisibility.PUBLIC, - JavaMethodKind.STATIC, + JavaMemberKind.STATIC, JavaTypeRef.VOID, List.of( new JavaParam(javaTypeRef, VALUE_NAME), @@ -527,7 +527,7 @@ public class JavaTransient0Generator implements Generator { return new JavaMethodDeclaration( decodeMethodName(type), JavaVisibility.PUBLIC, - JavaMethodKind.STATIC, + JavaMemberKind.STATIC, javaTypeRef, List.of( new JavaParam( diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javatypes/JavaTypesGenerator.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javatypes/JavaTypesGenerator.java index a008f8b..2a2c7ca 100644 --- a/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javatypes/JavaTypesGenerator.java +++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javatypes/JavaTypesGenerator.java @@ -147,7 +147,7 @@ public class JavaTypesGenerator implements Generator { new JavaMethodDeclaration( ARBITRARY_METHOD_NAME, JavaVisibility.PUBLIC, - JavaMethodKind.STATIC, + JavaMemberKind.STATIC, builderJavaTypeRef, List.of(), List.of(), @@ -179,7 +179,7 @@ public class JavaTypesGenerator implements Generator { body.add(new JavaMethodDeclaration( BUILD_METHOD_NAME, JavaVisibility.PUBLIC, - JavaMethodKind.INSTANCE, + JavaMemberKind.INSTANCE, generateTypeRef(structDefinition.type(), context), List.of(), List.of(), @@ -218,7 +218,7 @@ public class JavaTypesGenerator implements Generator { methods.add(new JavaMethodDeclaration( withMethodName, JavaVisibility.PUBLIC, - JavaMethodKind.INSTANCE, + JavaMemberKind.INSTANCE, builderJavaTypeRef, List.of( new JavaParam(generateTypeRef(field.type(), context), javaFieldName) @@ -238,7 +238,7 @@ public class JavaTypesGenerator implements Generator { methods.add(new JavaMethodDeclaration( withMethodName, JavaVisibility.PUBLIC, - JavaMethodKind.INSTANCE, + JavaMemberKind.INSTANCE, builderJavaTypeRef, List.of( new JavaParam(fieldBuilderTypeRef.get(), javaFieldName) @@ -277,7 +277,7 @@ public class JavaTypesGenerator implements Generator { methods.add(new JavaMethodDeclaration( addElementMethodName, JavaVisibility.PUBLIC, - JavaMethodKind.INSTANCE, + JavaMemberKind.INSTANCE, builderJavaTypeRef, List.of( new JavaParam(javaElementUnboxedType, javaElementName) @@ -310,7 +310,7 @@ public class JavaTypesGenerator implements Generator { methods.add(new JavaMethodDeclaration( addElementMethodName, JavaVisibility.PUBLIC, - JavaMethodKind.INSTANCE, + JavaMemberKind.INSTANCE, builderJavaTypeRef, List.of( new JavaParam(elementBuilderTypeRef.get(), javaElementName) @@ -349,7 +349,7 @@ public class JavaTypesGenerator implements Generator { methods.add(new JavaMethodDeclaration( withMethodName, JavaVisibility.PUBLIC, - JavaMethodKind.INSTANCE, + JavaMemberKind.INSTANCE, builderJavaTypeRef, List.of( new JavaParam(javaElementType, javaFieldName) @@ -379,7 +379,7 @@ public class JavaTypesGenerator implements Generator { methods.add(new JavaMethodDeclaration( withMethodName, JavaVisibility.PUBLIC, - JavaMethodKind.INSTANCE, + JavaMemberKind.INSTANCE, builderJavaTypeRef, List.of( new JavaParam(elementBuilderTypeRef.get(), javaFieldName) @@ -419,7 +419,7 @@ public class JavaTypesGenerator implements Generator { body.add(new JavaMethodDeclaration( generateFieldName(field.name()), JavaVisibility.PUBLIC, - JavaMethodKind.INSTANCE, + JavaMemberKind.INSTANCE, generateTypeRef(field.type().value(), context), List.of(), List.of(), @@ -450,7 +450,7 @@ public class JavaTypesGenerator implements Generator { new JavaMethodDeclaration( BUILD_METHOD_NAME, JavaVisibility.PUBLIC, - JavaMethodKind.INSTANCE, + JavaMemberKind.INSTANCE, generateTypeRef(sumDefinition.type(), context), List.of(), List.of(), diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMemberKind.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMemberKind.java new file mode 100644 index 0000000..e41b1e0 --- /dev/null +++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMemberKind.java @@ -0,0 +1,14 @@ +// Generated by hobgoblin. + +package org.zwobble.hobgoblin.compiler.output.lang.java.ast; + +// Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMemberKind imports +// Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMemberKind imports + +public enum JavaMemberKind { + STATIC, + INSTANCE + + // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMemberKind body + // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMemberKind body +} diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodDeclaration.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodDeclaration.java index 00b8af9..2d0ad26 100644 --- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodDeclaration.java +++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodDeclaration.java @@ -5,12 +5,12 @@ package org.zwobble.hobgoblin.compiler.output.lang.java.ast; // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration imports // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration imports -public record JavaMethodDeclaration(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIdentifier name, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaVisibility visibility, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodKind kind, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef returnType, java.util.List params, java.util.List throws_, java.util.Optional body) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration { +public record JavaMethodDeclaration(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIdentifier name, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaVisibility visibility, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMemberKind kind, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef returnType, java.util.List params, java.util.List throws_, java.util.Optional body) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration { public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder arbitrary() { - return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIdentifier.arbitrary().build(), org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaVisibility.PUBLIC, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodKind.STATIC, org.zwobble.hobgoblin.compiler.output.lang.java.ast.HobgoblinNativeAst.arbitraryJavaTypeRef(), java.util.List.of(), java.util.List.of(), java.util.Optional.empty()); + return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIdentifier.arbitrary().build(), org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaVisibility.PUBLIC, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMemberKind.STATIC, org.zwobble.hobgoblin.compiler.output.lang.java.ast.HobgoblinNativeAst.arbitraryJavaTypeRef(), java.util.List.of(), java.util.List.of(), java.util.Optional.empty()); } - public record Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIdentifier name, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaVisibility visibility, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodKind kind, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef returnType, java.util.List params, java.util.List throws_, java.util.Optional body) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration.Builder { + public record Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIdentifier name, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaVisibility visibility, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMemberKind kind, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef returnType, java.util.List params, java.util.List throws_, java.util.Optional body) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration.Builder { public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration build() { return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration(name, visibility, kind, returnType, params, throws_, body); } @@ -27,7 +27,7 @@ public record JavaMethodDeclaration(org.zwobble.hobgoblin.compiler.output.lang.j return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder(name, visibility, kind, returnType, params, throws_, body); } - public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder withKind(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodKind kind) { + public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder withKind(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMemberKind kind) { return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder(name, visibility, kind, returnType, params, throws_, body); } @@ -81,7 +81,7 @@ public record JavaMethodDeclaration(org.zwobble.hobgoblin.compiler.output.lang.j public JavaMethodDeclaration( JavaIdentifier name, JavaVisibility visibility, - JavaMethodKind kind, + JavaMemberKind kind, JavaTypeRef returnType, java.util.List params, java.util.List throws_, diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodKind.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodKind.java deleted file mode 100644 index c7f8ca6..0000000 --- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodKind.java +++ /dev/null @@ -1,14 +0,0 @@ -// Generated by hobgoblin. - -package org.zwobble.hobgoblin.compiler.output.lang.java.ast; - -// Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodKind imports -// Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodKind imports - -public enum JavaMethodKind { - STATIC, - INSTANCE - - // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodKind body - // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodKind body -} 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