summaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-07-07 19:16:51 +0100
committerMichael Williamson <mike@zwobble.org>2026-07-07 19:16:51 +0100
commit2536899969733a81a0001eb2da0d1d478c092e4b (patch)
tree788d93a696bc4f6b6c2cc38b6178124bded5b551 /src/test/java
parent870371abf7ec001d612f08f275f52d4a4c952db9 (diff)
Don't store custom areas directly in AST
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/JavaWriterTests.java70
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaClassDeclarationMatcher.java10
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCompilationUnitMatcher.java12
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaEnumDeclarationMatcher.java10
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaInterfaceDeclarationMatcher.java10
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordDeclarationMatcher.java10
6 files changed, 32 insertions, 90 deletions
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 0b5f959..ecdcaff 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
@@ -17,13 +17,10 @@ public class JavaWriterTests {
@Test
public void compilationUnit() throws IOException {
var java = new JavaCompilationUnit(
- JavaPackageName.of("com", "example", "shapes"),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Rectangle")), "imports"),
new JavaClassDeclaration(
- JavaIdentifier.of("Rectangle"),
+ JavaTypeRef.topLevel(JavaPackageName.of("com", "example", "shapes"), JavaIdentifier.of("Rectangle")),
List.of(),
List.of(),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Rectangle")), "body"),
DocComment.EMPTY
)
);
@@ -35,12 +32,12 @@ public class JavaWriterTests {
package com.example.shapes;
- // Custom area start: Rectangle imports
- // Custom area end: Rectangle imports
+ // Custom area start: com.example.shapes.Rectangle imports
+ // Custom area end: com.example.shapes.Rectangle imports
public class Rectangle {
- // Custom area start: Rectangle body
- // Custom area end: Rectangle body
+ // Custom area start: com.example.shapes.Rectangle body
+ // Custom area end: com.example.shapes.Rectangle body
}
"""
));
@@ -49,10 +46,9 @@ public class JavaWriterTests {
@Test
public void emptyClassDeclaration() throws IOException {
var java = new JavaClassDeclaration(
- JavaIdentifier.of("Rectangle"),
+ JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Rectangle")),
List.of(),
List.of(),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Rectangle")), "body"),
DocComment.EMPTY
);
@@ -69,7 +65,7 @@ public class JavaWriterTests {
@Test
public void classDeclarationImplementingSingleInterface() throws IOException {
var java = new JavaClassDeclaration(
- JavaIdentifier.of("Rectangle"),
+ JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Rectangle")),
List.of(
JavaTypeRef.topLevel(
JavaPackageName.of("com", "example"),
@@ -77,7 +73,6 @@ public class JavaWriterTests {
)
),
List.of(),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Rectangle")), "body"),
DocComment.EMPTY
);
@@ -94,13 +89,12 @@ public class JavaWriterTests {
@Test
public void classDeclarationImplementingMultipleInterfaces() throws IOException {
var java = new JavaClassDeclaration(
- JavaIdentifier.of("Rectangle"),
+ JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Rectangle")),
List.of(
JavaTypeRef.topLevel(JavaPackageName.of("com", "example"), JavaIdentifier.of("Shape")),
JavaTypeRef.topLevel(JavaPackageName.of("com", "example"), JavaIdentifier.of("Drawable"))
),
List.of(),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Rectangle")), "body"),
DocComment.EMPTY
);
@@ -117,7 +111,7 @@ public class JavaWriterTests {
@Test
public void classDeclarationWithMethods() throws IOException {
var java = new JavaClassDeclaration(
- JavaIdentifier.of("Rectangle"),
+ JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Rectangle")),
List.of(),
List.of(
JavaMethodDeclaration.arbitrary()
@@ -135,7 +129,6 @@ public class JavaWriterTests {
.withBody(JavaBlock.EMPTY)
.build()
),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Rectangle")), "body"),
DocComment.EMPTY
);
@@ -158,10 +151,9 @@ public class JavaWriterTests {
@Test
public void classDeclarationWithDocComment() throws IOException {
var java = new JavaClassDeclaration(
- JavaIdentifier.of("Point"),
+ JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Point")),
List.of(),
List.of(),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Point")), "body"),
new DocComment("A 2D point.")
);
@@ -179,8 +171,7 @@ public class JavaWriterTests {
@Test
public void emptyEnumDeclaration() throws IOException {
var java = JavaEnumDeclaration.arbitrary()
- .withName(JavaIdentifier.of("SmallNumber"))
- .withCustomArea(JavaCustomArea.forType(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("SmallNumber")), "body"))
+ .withType(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("SmallNumber")))
.build();
var string = write(writer -> writer.writeTypeDeclaration(java));
@@ -196,8 +187,7 @@ public class JavaWriterTests {
@Test
public void enumDeclarationWithConstants() throws IOException {
var java = JavaEnumDeclaration.arbitrary()
- .withName(JavaIdentifier.of("SmallNumber"))
- .withCustomArea(JavaCustomArea.forType(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("SmallNumber")), "body"))
+ .withType(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("SmallNumber")))
.withConstants(List.of(
JavaEnumConstant.arbitrary().withName(JavaIdentifier.of("ZERO")).build(),
JavaEnumConstant.arbitrary().withName(JavaIdentifier.of("ONE")).build(),
@@ -222,9 +212,8 @@ public class JavaWriterTests {
@Test
public void enumDeclarationWithDocComment() throws IOException {
var java = JavaEnumDeclaration.arbitrary()
- .withName(JavaIdentifier.of("SmallNumber"))
+ .withType(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("SmallNumber")))
.withDocComment(new DocComment("A small number."))
- .withCustomArea(JavaCustomArea.forType(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("SmallNumber")), "body"))
.build();
var string = write(writer -> writer.writeTypeDeclaration(java));
@@ -241,11 +230,10 @@ public class JavaWriterTests {
@Test
public void openInterfaceDeclaration() throws IOException {
var java = new JavaInterfaceDeclaration(
- JavaIdentifier.of("Shape"),
+ JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Shape")),
JavaInterfaceOpenness.OPEN,
List.of(),
List.of(),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Shape")), "body"),
DocComment.EMPTY
);
@@ -262,11 +250,10 @@ public class JavaWriterTests {
@Test
public void sealedInterfaceDeclaration() throws IOException {
var java = new JavaInterfaceDeclaration(
- JavaIdentifier.of("Shape"),
+ JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Shape")),
JavaInterfaceOpenness.SEALED,
List.of(),
List.of(),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Shape")), "body"),
DocComment.EMPTY
);
@@ -283,14 +270,13 @@ public class JavaWriterTests {
@Test
public void sealedInterfaceDeclarationWithPermitsTypes() throws IOException {
var java = new JavaInterfaceDeclaration(
- JavaIdentifier.of("Shape"),
+ JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Shape")),
JavaInterfaceOpenness.SEALED,
List.of(
JavaTypeRef.topLevel(JavaPackageName.of("abc", "def"), JavaIdentifier.of("One")),
JavaTypeRef.topLevel(JavaPackageName.of("abc", "def"), JavaIdentifier.of("Two"))
),
List.of(),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Shape")), "body"),
DocComment.EMPTY
);
@@ -307,11 +293,10 @@ public class JavaWriterTests {
@Test
public void interfaceDeclarationWithDocComment() throws IOException {
var java = new JavaInterfaceDeclaration(
- JavaIdentifier.of("Shape"),
+ JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Shape")),
JavaInterfaceOpenness.OPEN,
List.of(),
List.of(),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Shape")), "body"),
new DocComment("A 2D shape.")
);
@@ -329,7 +314,7 @@ public class JavaWriterTests {
@Test
public void interfaceDeclarationWithBody() throws IOException {
var java = new JavaInterfaceDeclaration(
- JavaIdentifier.of("Shape"),
+ JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Shape")),
JavaInterfaceOpenness.OPEN,
List.of(),
List.of(
@@ -348,7 +333,6 @@ public class JavaWriterTests {
.withBody(JavaBlock.EMPTY)
.build()
),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Shape")), "body"),
DocComment.EMPTY
);
@@ -371,11 +355,10 @@ public class JavaWriterTests {
@Test
public void emptyRecordDeclaration() throws IOException {
var java = new JavaRecordDeclaration(
- JavaIdentifier.of("Point"),
+ JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Point")),
List.of(),
List.of(),
List.of(),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Point")), "body"),
DocComment.EMPTY
);
@@ -392,11 +375,10 @@ public class JavaWriterTests {
@Test
public void recordDeclarationWithDocComment() throws IOException {
var java = new JavaRecordDeclaration(
- JavaIdentifier.of("Point"),
+ JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Point")),
List.of(),
List.of(),
List.of(),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Point")), "body"),
new DocComment("A 2D point.")
);
@@ -414,13 +396,12 @@ public class JavaWriterTests {
@Test
public void recordDeclarationImplementingOneInterface() throws IOException {
var java = new JavaRecordDeclaration(
- JavaIdentifier.of("Rectangle"),
+ JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Rectangle")),
List.of(),
List.of(
JavaTypeRef.topLevel(JavaPackageName.of("com", "example"), JavaIdentifier.of("Shape"))
),
List.of(),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Rectangle")), "body"),
DocComment.EMPTY
);
@@ -437,14 +418,13 @@ public class JavaWriterTests {
@Test
public void recordDeclarationImplementingMultipleInterfaces() throws IOException {
var java = new JavaRecordDeclaration(
- JavaIdentifier.of("Rectangle"),
+ JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Rectangle")),
List.of(),
List.of(
JavaTypeRef.topLevel(JavaPackageName.of("com", "example"), JavaIdentifier.of("Shape")),
JavaTypeRef.topLevel(JavaPackageName.of("com", "example"), JavaIdentifier.of("Drawable"))
),
List.of(),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Rectangle")), "body"),
DocComment.EMPTY
);
@@ -461,7 +441,7 @@ public class JavaWriterTests {
@Test
public void recordDeclarationWithMethods() throws IOException {
var java = new JavaRecordDeclaration(
- JavaIdentifier.of("Rectangle"),
+ JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Rectangle")),
List.of(),
List.of(),
List.of(
@@ -480,7 +460,6 @@ public class JavaWriterTests {
.withBody(JavaBlock.EMPTY)
.build()
),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Rectangle")), "body"),
DocComment.EMPTY
);
@@ -1152,11 +1131,10 @@ public class JavaWriterTests {
@Test
public void customAreaContentsArePreserved() throws IOException {
var java = new JavaRecordDeclaration(
- JavaIdentifier.of("Point"),
+ JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Point")),
List.of(),
List.of(),
List.of(),
- new JavaCustomArea(JavaTypeRef.topLevel(JavaPackageName.EMPTY, JavaIdentifier.of("Point")), "body"),
DocComment.EMPTY
);
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaClassDeclarationMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaClassDeclarationMatcher.java
index 5a94055..9145e8a 100644
--- a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaClassDeclarationMatcher.java
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaClassDeclarationMatcher.java
@@ -28,9 +28,9 @@ public class JavaClassDeclarationMatcher implements org.zwobble.precisely.Matche
return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.class, this.submatchers);
}
- public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher withName(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIdentifier> name) {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher withType(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> type) {
var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration>>(this.submatchers);
- submatchers.add(org.zwobble.precisely.Matchers.has("name", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration::name, name));
+ submatchers.add(org.zwobble.precisely.Matchers.has("type", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration::type, type));
return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher(submatchers);
}
@@ -46,12 +46,6 @@ public class JavaClassDeclarationMatcher implements org.zwobble.precisely.Matche
return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher(submatchers);
}
- public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher withCustomArea(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea> customArea) {
- var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration>>(this.submatchers);
- submatchers.add(org.zwobble.precisely.Matchers.has("customArea", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration::customArea, customArea));
- return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher(submatchers);
- }
-
public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher withDocComment(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.ast.DocComment> docComment) {
var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration>>(this.submatchers);
submatchers.add(org.zwobble.precisely.Matchers.has("docComment", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration::docComment, docComment));
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCompilationUnitMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCompilationUnitMatcher.java
index b25759a..95bb6d1 100644
--- a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCompilationUnitMatcher.java
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCompilationUnitMatcher.java
@@ -28,18 +28,6 @@ public class JavaCompilationUnitMatcher implements org.zwobble.precisely.Matcher
return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit.class, this.submatchers);
}
- public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnitMatcher withPackageName(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaPackageName> packageName) {
- var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit>>(this.submatchers);
- submatchers.add(org.zwobble.precisely.Matchers.has("packageName", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit::packageName, packageName));
- return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnitMatcher(submatchers);
- }
-
- public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnitMatcher withCustomAreaImports(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea> customAreaImports) {
- var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit>>(this.submatchers);
- submatchers.add(org.zwobble.precisely.Matchers.has("customAreaImports", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit::customAreaImports, customAreaImports));
- return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnitMatcher(submatchers);
- }
-
public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnitMatcher withTypeDeclaration(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeDeclaration> typeDeclaration) {
var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit>>(this.submatchers);
submatchers.add(org.zwobble.precisely.Matchers.has("typeDeclaration", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit::typeDeclaration, typeDeclaration));
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaEnumDeclarationMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaEnumDeclarationMatcher.java
index a97ded5..86a477a 100644
--- a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaEnumDeclarationMatcher.java
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaEnumDeclarationMatcher.java
@@ -28,9 +28,9 @@ public class JavaEnumDeclarationMatcher implements org.zwobble.precisely.Matcher
return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaEnumDeclaration.class, this.submatchers);
}
- public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaEnumDeclarationMatcher withName(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIdentifier> name) {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaEnumDeclarationMatcher withType(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> type) {
var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaEnumDeclaration>>(this.submatchers);
- submatchers.add(org.zwobble.precisely.Matchers.has("name", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaEnumDeclaration::name, name));
+ submatchers.add(org.zwobble.precisely.Matchers.has("type", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaEnumDeclaration::type, type));
return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaEnumDeclarationMatcher(submatchers);
}
@@ -40,12 +40,6 @@ public class JavaEnumDeclarationMatcher implements org.zwobble.precisely.Matcher
return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaEnumDeclarationMatcher(submatchers);
}
- public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaEnumDeclarationMatcher withCustomArea(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea> customArea) {
- var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaEnumDeclaration>>(this.submatchers);
- submatchers.add(org.zwobble.precisely.Matchers.has("customArea", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaEnumDeclaration::customArea, customArea));
- return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaEnumDeclarationMatcher(submatchers);
- }
-
public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaEnumDeclarationMatcher withDocComment(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.ast.DocComment> docComment) {
var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaEnumDeclaration>>(this.submatchers);
submatchers.add(org.zwobble.precisely.Matchers.has("docComment", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaEnumDeclaration::docComment, docComment));
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaInterfaceDeclarationMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaInterfaceDeclarationMatcher.java
index 2d7a89c..bd45d2b 100644
--- a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaInterfaceDeclarationMatcher.java
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaInterfaceDeclarationMatcher.java
@@ -28,9 +28,9 @@ public class JavaInterfaceDeclarationMatcher implements org.zwobble.precisely.Ma
return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.class, this.submatchers);
}
- public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher withName(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIdentifier> name) {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher withType(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> type) {
var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration>>(this.submatchers);
- submatchers.add(org.zwobble.precisely.Matchers.has("name", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration::name, name));
+ submatchers.add(org.zwobble.precisely.Matchers.has("type", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration::type, type));
return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher(submatchers);
}
@@ -52,12 +52,6 @@ public class JavaInterfaceDeclarationMatcher implements org.zwobble.precisely.Ma
return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher(submatchers);
}
- public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher withCustomArea(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea> customArea) {
- var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration>>(this.submatchers);
- submatchers.add(org.zwobble.precisely.Matchers.has("customArea", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration::customArea, customArea));
- return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher(submatchers);
- }
-
public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher withDocComment(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.ast.DocComment> docComment) {
var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration>>(this.submatchers);
submatchers.add(org.zwobble.precisely.Matchers.has("docComment", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration::docComment, docComment));
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordDeclarationMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordDeclarationMatcher.java
index d3eed88..afcc36e 100644
--- a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordDeclarationMatcher.java
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordDeclarationMatcher.java
@@ -28,9 +28,9 @@ public class JavaRecordDeclarationMatcher implements org.zwobble.precisely.Match
return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.class, this.submatchers);
}
- public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher withName(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIdentifier> name) {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher withType(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> type) {
var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration>>(this.submatchers);
- submatchers.add(org.zwobble.precisely.Matchers.has("name", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration::name, name));
+ submatchers.add(org.zwobble.precisely.Matchers.has("type", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration::type, type));
return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher(submatchers);
}
@@ -52,12 +52,6 @@ public class JavaRecordDeclarationMatcher implements org.zwobble.precisely.Match
return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher(submatchers);
}
- public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher withCustomArea(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea> customArea) {
- var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration>>(this.submatchers);
- submatchers.add(org.zwobble.precisely.Matchers.has("customArea", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration::customArea, customArea));
- return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher(submatchers);
- }
-
public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher withDocComment(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.ast.DocComment> docComment) {
var submatchers = new java.util.ArrayList<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration>>(this.submatchers);
submatchers.add(org.zwobble.precisely.Matchers.has("docComment", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration::docComment, docComment));