summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-06-12 20:44:53 +0100
committerMichael Williamson <mike@zwobble.org>2026-06-12 20:59:36 +0100
commit5ee132e804d7faec0929a332866d5ed146dbdf59 (patch)
tree02da0493ad3fa1b80c7cbc94d5d8718415ee24a6
parentda2320d8104c9f3f0bbe4c0c4343ebddc732a689 (diff)
Define Java AST using hobgoblin
-rw-r--r--hobgoblin/hobgoblin.json512
-rw-r--r--hobgoblin/src/output/lang/java/ast.hob201
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javapreciselymatchers/JavaPreciselyMatchersGenerator.java2
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javatypes/JavaTypesGenerator.java8
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaAssignment.java38
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaBlock.java25
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaBlockStatement.java13
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaClassBodyDeclaration.java13
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaClassDeclaration.java49
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCompilationUnit.java34
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaConstructorDeclaration.java44
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCustomArea.java29
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaExpression.java13
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaExpressionStatement.java27
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldAccess.java34
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldDeclaration.java35
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaIntegerLiteral.java23
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaInterfaceDeclaration.java54
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodCall.java39
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodDeclaration.java57
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodRef.java27
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNewExpression.java30
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNullLiteral.java19
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaParam.java30
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordComponent.java27
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordDeclaration.java54
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRef.java23
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaReturn.java27
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticFieldAccess.java30
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticMethodCall.java35
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStringLiteral.java23
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaTypeDeclaration.java13
-rw-r--r--src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/Native.java28
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaAssignmentMatcher.java38
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaBlockMatcher.java34
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaClassDeclarationMatcher.java50
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCompilationUnitMatcher.java38
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaConstructorDeclarationMatcher.java46
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCustomAreaMatcher.java38
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaExpressionStatementMatcher.java34
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldAccessMatcher.java38
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldDeclarationMatcher.java42
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaIntegerLiteralMatcher.java34
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaInterfaceDeclarationMatcher.java54
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodCallMatcher.java42
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodDeclarationMatcher.java54
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodRefMatcher.java38
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNewExpressionMatcher.java38
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNullLiteralMatcher.java30
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaParamMatcher.java38
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordComponentMatcher.java38
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordDeclarationMatcher.java54
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRefMatcher.java34
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaReturnMatcher.java34
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticFieldAccessMatcher.java38
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticMethodCallMatcher.java42
-rw-r--r--src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStringLiteralMatcher.java34
57 files changed, 1960 insertions, 116 deletions
diff --git a/hobgoblin/hobgoblin.json5 b/hobgoblin/hobgoblin.json5
index 12c4ecc..a2f32de 100644
--- a/hobgoblin/hobgoblin.json5
+++ b/hobgoblin/hobgoblin.json5
@@ -16,7 +16,11 @@
{
hobgoblin: "ast/untyped.DocComment",
java: "org.zwobble.hobgoblin.compiler.ast.DocComment",
- }
+ },
+ {
+ hobgoblin: "output/lang/java/ast.DocComment",
+ java: "org.zwobble.hobgoblin.compiler.ast.DocComment",
+ },
],
},
{
@@ -35,7 +39,11 @@
{
hobgoblin: "ast/untyped.DocComment",
java: "org.zwobble.hobgoblin.compiler.ast.DocComment",
- }
+ },
+ {
+ hobgoblin: "output/lang/java/ast.DocComment",
+ java: "org.zwobble.hobgoblin.compiler.ast.DocComment",
+ },
]
}
],
diff --git a/hobgoblin/src/output/lang/java/ast.hob b/hobgoblin/src/output/lang/java/ast.hob
new file mode 100644
index 0000000..887dcaa
--- /dev/null
+++ b/hobgoblin/src/output/lang/java/ast.hob
@@ -0,0 +1,201 @@
+// == Compilation units ==
+
+struct JavaCompilationUnit {
+ field packageName: List[String];
+ field typeDeclaration: JavaTypeDeclaration;
+}
+
+// == Type declarations ==
+
+sum JavaTypeDeclaration {
+ variant JavaClassDeclaration;
+ variant JavaInterfaceDeclaration;
+ variant JavaRecordDeclaration;
+}
+
+struct JavaClassDeclaration {
+ field name: String;
+ field implementsTypes: List[JavaTypeRef];
+ field body: List[JavaClassBodyDeclaration];
+ field customArea: JavaCustomArea;
+ field docComment: DocComment;
+}
+
+struct JavaInterfaceDeclaration {
+ field name: String;
+ field openness: JavaInterfaceOpenness;
+ field permitsTypes: List[JavaTypeRef];
+ field body: List[JavaClassBodyDeclaration];
+ field customArea: JavaCustomArea;
+ field docComment: DocComment;
+}
+
+native JavaInterfaceOpenness {
+}
+
+struct JavaRecordComponent {
+ field type: JavaTypeRef;
+ field name: String;
+}
+
+struct JavaRecordDeclaration {
+ field name: String;
+ field components: List[JavaRecordComponent];
+ field implementsTypes: List[JavaTypeRef];
+ field body: List[JavaClassBodyDeclaration];
+ field customArea: JavaCustomArea;
+ field docComment: DocComment;
+}
+
+// == Type declaration bodies ==
+
+// TODO: allow JavaClassBodyDeclaration to extend JavaTypeDeclaration
+sum JavaClassBodyDeclaration {
+ variant JavaClassDeclaration;
+ variant JavaConstructorDeclaration;
+ variant JavaFieldDeclaration;
+ variant JavaInterfaceDeclaration;
+ variant JavaMethodDeclaration;
+ variant JavaRecordDeclaration;
+}
+
+struct JavaConstructorDeclaration {
+ field typeName: String;
+ field visibility: JavaVisibility;
+ field params: List[JavaParam];
+ field body: JavaBlock;
+}
+
+struct JavaFieldDeclaration {
+ field visibility: JavaVisibility;
+ field type: JavaTypeRef;
+ field name: String;
+}
+
+struct JavaMethodDeclaration {
+ field name: String;
+ field visibility: JavaVisibility;
+ field kind: JavaMethodKind;
+ field returnType: JavaTypeRef;
+ field params: List[JavaParam];
+ field body: Option[JavaBlock];
+}
+
+// == Methods ==
+
+native JavaMethodKind {
+}
+
+struct JavaParam {
+ field type: JavaTypeRef;
+ field name: String;
+}
+
+// == Type references ==
+
+native JavaTypeRef {
+}
+
+// == Visibility ==
+
+native JavaVisibility {
+}
+
+// == Statements ==
+
+struct JavaBlock {
+ field statements: List[JavaBlockStatement];
+}
+
+sum JavaBlockStatement {
+ variant JavaExpressionStatement;
+ variant JavaReturn;
+}
+
+struct JavaExpressionStatement {
+ field expression: JavaExpression;
+}
+
+struct JavaReturn {
+ field value: JavaExpression;
+}
+
+// == Expressions ==
+
+sum JavaExpression {
+ variant JavaAssignment;
+ variant JavaFieldAccess;
+ variant JavaIntegerLiteral;
+ variant JavaMethodCall;
+ variant JavaMethodRef;
+ variant JavaNewExpression;
+ variant JavaNullLiteral;
+ variant JavaRef;
+ variant JavaStaticFieldAccess;
+ variant JavaStaticMethodCall;
+ variant JavaStringLiteral;
+}
+
+struct JavaAssignment {
+ field left: JavaExpression;
+ field right: JavaExpression;
+}
+
+struct JavaFieldAccess {
+ field receiver: JavaExpression;
+ field fieldName: String;
+}
+
+struct JavaIntegerLiteral {
+ field value: Int64;
+}
+
+struct JavaMethodCall {
+ field receiver: JavaExpression;
+ field methodName: String;
+ field args: List[JavaExpression];
+}
+
+struct JavaMethodRef {
+ field type: JavaTypeRef;
+ field methodName: String;
+}
+
+struct JavaNewExpression {
+ field type: JavaTypeRef;
+ field args: List[JavaExpression];
+}
+
+struct JavaNullLiteral {
+}
+
+struct JavaRef {
+ field name: String;
+}
+
+struct JavaStaticFieldAccess {
+ field type: JavaTypeRef;
+ field fieldName: String;
+}
+
+struct JavaStaticMethodCall {
+ field type: JavaTypeRef;
+ field methodName: String;
+ field args: List[JavaExpression];
+}
+
+struct JavaStringLiteral {
+ field value: String;
+}
+
+// == Custom areas ==
+
+struct JavaCustomArea {
+ field type: JavaTypeRef;
+ field name: String;
+}
+
+// == Doc comments ==
+
+native DocComment {
+}
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 f592aa7..e1a9e38 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
@@ -250,7 +250,7 @@ public class JavaPreciselyMatchersGenerator implements Generator {
)
),
methods,
- JavaCustomArea.type(javaMatcherTypeRef, "body"),
+ JavaCustomArea.forType(javaMatcherTypeRef, "body"),
DocComment.EMPTY
);
}
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 de33968..8f9ea13 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
@@ -101,11 +101,11 @@ public class JavaTypesGenerator implements Generator {
Optional.empty()
)
),
- JavaCustomArea.type(generateBuilderTypeRef(sumDefinition.type()), "body"),
+ JavaCustomArea.forType(generateBuilderTypeRef(sumDefinition.type()), "body"),
DocComment.EMPTY
)
),
- JavaCustomArea.type(generateTypeRef(sumDefinition.type(), context), "body"),
+ JavaCustomArea.forType(generateTypeRef(sumDefinition.type(), context), "body"),
sumDefinition.docComment()
)
);
@@ -159,7 +159,7 @@ public class JavaTypesGenerator implements Generator {
),
generateStructDefinitionBuilder(structDefinition, components, context)
),
- JavaCustomArea.type(generateTypeRef(structDefinition.type(), context), "body"),
+ JavaCustomArea.forType(generateTypeRef(structDefinition.type(), context), "body"),
structDefinition.docComment()
);
}
@@ -241,7 +241,7 @@ public class JavaTypesGenerator implements Generator {
components,
implementsTypes,
body,
- JavaCustomArea.type(builderJavaTypeRef, "body"),
+ JavaCustomArea.forType(builderJavaTypeRef, "body"),
DocComment.EMPTY
);
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaAssignment.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaAssignment.java
index b53e192..f17c9f3 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaAssignment.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaAssignment.java
@@ -1,7 +1,37 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public record JavaAssignment(
- JavaExpression left,
- JavaExpression right
-) implements JavaExpression {
+public record JavaAssignment(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression left, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression right) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment.Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral.arbitrary().build(), org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral.arbitrary().build());
+ }
+
+ public record Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression left, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression right) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment(left, right);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment.Builder withLeft(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression left) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment.Builder(left, right);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment.Builder withLeft(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder left) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment.Builder(left.build(), right);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment.Builder withRight(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression right) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment.Builder(left, right);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment.Builder withRight(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder right) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment.Builder(left, right.build());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaBlock.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaBlock.java
index f758831..69747be 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaBlock.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaBlock.java
@@ -1,11 +1,30 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-import java.util.List;
+public record JavaBlock(java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockStatement> statements) {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock.Builder(java.util.List.of());
+ }
+
+ public record Builder(java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockStatement> statements) {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock(statements);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock.Builder withStatements(java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockStatement> statements) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock.Builder(statements);
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock.Builder body
+ }
-public record JavaBlock(List<JavaBlockStatement> statements) {
- public static final JavaBlock EMPTY = new JavaBlock(List.of());
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock body
+ public static final JavaBlock EMPTY = new JavaBlock(java.util.List.of());
public boolean isEmpty() {
return this.statements.isEmpty();
}
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaBlockStatement.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaBlockStatement.java
index fe3e69a..19218f4 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaBlockStatement.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaBlockStatement.java
@@ -1,4 +1,15 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public sealed interface JavaBlockStatement permits JavaExpressionStatement, JavaReturn {
+public sealed interface JavaBlockStatement permits org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatement, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturn {
+ public interface Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockStatement build();
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockStatement.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockStatement.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockStatement body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockStatement body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaClassBodyDeclaration.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaClassBodyDeclaration.java
index 5ce363d..117bc72 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaClassBodyDeclaration.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaClassBodyDeclaration.java
@@ -1,4 +1,15 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public sealed interface JavaClassBodyDeclaration permits JavaConstructorDeclaration, JavaFieldDeclaration, JavaMethodDeclaration, JavaTypeDeclaration {
+public sealed interface JavaClassBodyDeclaration permits org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration {
+ public interface Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration build();
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaClassDeclaration.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaClassDeclaration.java
index 7a099ef..a05e2ed 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaClassDeclaration.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaClassDeclaration.java
@@ -1,14 +1,45 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-import org.zwobble.hobgoblin.compiler.ast.DocComment;
+public record JavaClassDeclaration(String name, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> implementsTypes, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration> body, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea customArea, org.zwobble.hobgoblin.compiler.ast.DocComment docComment) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeDeclaration, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.Builder("", java.util.List.of(), java.util.List.of(), org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea.arbitrary().build(), org.zwobble.hobgoblin.compiler.output.lang.java.ast.Native.arbitraryDocComment());
+ }
+
+ public record Builder(String name, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> implementsTypes, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration> body, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea customArea, org.zwobble.hobgoblin.compiler.ast.DocComment docComment) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeDeclaration.Builder, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration(name, implementsTypes, body, customArea, docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.Builder withName(String name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.Builder(name, implementsTypes, body, customArea, docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.Builder withImplementsTypes(java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> implementsTypes) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.Builder(name, implementsTypes, body, customArea, docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.Builder withBody(java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration> body) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.Builder(name, implementsTypes, body, customArea, docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.Builder withCustomArea(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea customArea) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.Builder(name, implementsTypes, body, customArea, docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.Builder withCustomArea(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea.Builder customArea) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.Builder(name, implementsTypes, body, customArea.build(), docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.Builder withDocComment(org.zwobble.hobgoblin.compiler.ast.DocComment docComment) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.Builder(name, implementsTypes, body, customArea, docComment);
+ }
-import java.util.List;
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.Builder body
+ }
-public record JavaClassDeclaration(
- String name,
- List<JavaTypeRef> implementsTypes,
- List<JavaClassBodyDeclaration> body,
- JavaCustomArea customArea,
- DocComment docComment
-) implements JavaTypeDeclaration {
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCompilationUnit.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCompilationUnit.java
index ebcb316..252380c 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCompilationUnit.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCompilationUnit.java
@@ -1,9 +1,33 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-import java.util.List;
+public record JavaCompilationUnit(java.util.List<String> packageName, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeDeclaration typeDeclaration) {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit.Builder(java.util.List.of(), org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration.arbitrary().build());
+ }
+
+ public record Builder(java.util.List<String> packageName, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeDeclaration typeDeclaration) {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit(packageName, typeDeclaration);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit.Builder withPackageName(java.util.List<String> packageName) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit.Builder(packageName, typeDeclaration);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit.Builder withTypeDeclaration(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeDeclaration typeDeclaration) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit.Builder(packageName, typeDeclaration);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit.Builder withTypeDeclaration(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeDeclaration.Builder typeDeclaration) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit.Builder(packageName, typeDeclaration.build());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit.Builder body
+ }
-public record JavaCompilationUnit(
- List<String> packageName,
- JavaTypeDeclaration typeDeclaration
-) {
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaConstructorDeclaration.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaConstructorDeclaration.java
index a6799f8..b8898c7 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaConstructorDeclaration.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaConstructorDeclaration.java
@@ -1,11 +1,41 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-import java.util.List;
+public record JavaConstructorDeclaration(String typeName, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaVisibility visibility, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam> params, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock body) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration.Builder("", org.zwobble.hobgoblin.compiler.output.lang.java.ast.Native.arbitraryJavaVisibility(), java.util.List.of(), org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock.arbitrary().build());
+ }
+
+ public record Builder(String typeName, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaVisibility visibility, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam> params, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock body) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration(typeName, visibility, params, body);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration.Builder withTypeName(String typeName) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration.Builder(typeName, visibility, params, body);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration.Builder withVisibility(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaVisibility visibility) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration.Builder(typeName, visibility, params, body);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration.Builder withParams(java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam> params) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration.Builder(typeName, visibility, params, body);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration.Builder withBody(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock body) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration.Builder(typeName, visibility, params, body);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration.Builder withBody(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock.Builder body) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration.Builder(typeName, visibility, params, body.build());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration.Builder body
+ }
-public record JavaConstructorDeclaration(
- String typeName,
- JavaVisibility visibility,
- List<JavaParam> params,
- JavaBlock body
-) implements JavaClassBodyDeclaration {
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCustomArea.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCustomArea.java
index 51e3096..f035a4f 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCustomArea.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCustomArea.java
@@ -1,7 +1,32 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public record JavaCustomArea(JavaTypeRef type, String name) {
- public static JavaCustomArea type(JavaTypeRef type, String name) {
+public record JavaCustomArea(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type, String name) {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea.Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.Native.arbitraryJavaTypeRef(), "");
+ }
+
+ public record Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type, String name) {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea(type, name);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea.Builder withType(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea.Builder(type, name);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea.Builder withName(String name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea.Builder(type, name);
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea body
+ public static JavaCustomArea forType(JavaTypeRef type, String name) {
return new JavaCustomArea(type, name);
}
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaExpression.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaExpression.java
index 289b3e0..dae488d 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaExpression.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaExpression.java
@@ -1,4 +1,15 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public sealed interface JavaExpression permits JavaAssignment, JavaFieldAccess, JavaIntegerLiteral, JavaMethodCall, JavaMethodRef, JavaNewExpression, JavaNullLiteral, JavaRef, JavaStaticFieldAccess, JavaStaticMethodCall, JavaStringLiteral {
+public sealed interface JavaExpression permits org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNullLiteral, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRef, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteral {
+ public interface Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression build();
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaExpressionStatement.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaExpressionStatement.java
index 2ec771f..7ae1cd4 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaExpressionStatement.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaExpressionStatement.java
@@ -1,4 +1,29 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public record JavaExpressionStatement(JavaExpression expression) implements JavaBlockStatement {
+public record JavaExpressionStatement(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression expression) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockStatement {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatement.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatement.Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral.arbitrary().build());
+ }
+
+ public record Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression expression) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockStatement.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatement build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatement(expression);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatement.Builder withExpression(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression expression) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatement.Builder(expression);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatement.Builder withExpression(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder expression) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatement.Builder(expression.build());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatement.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatement.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatement body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatement body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldAccess.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldAccess.java
index e213121..3ae942a 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldAccess.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldAccess.java
@@ -1,7 +1,33 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public record JavaFieldAccess(
- JavaExpression receiver,
- String fieldName
-) implements JavaExpression {
+public record JavaFieldAccess(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression receiver, String fieldName) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess.Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral.arbitrary().build(), "");
+ }
+
+ public record Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression receiver, String fieldName) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess(receiver, fieldName);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess.Builder withReceiver(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression receiver) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess.Builder(receiver, fieldName);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess.Builder withReceiver(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder receiver) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess.Builder(receiver.build(), fieldName);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess.Builder withFieldName(String fieldName) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess.Builder(receiver, fieldName);
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldDeclaration.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldDeclaration.java
index 14855de..81f26ea 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldDeclaration.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldDeclaration.java
@@ -1,8 +1,33 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public record JavaFieldDeclaration(
- JavaVisibility visibility,
- JavaTypeRef type,
- String name
-) implements JavaClassBodyDeclaration {
+public record JavaFieldDeclaration(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaVisibility visibility, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type, String name) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration.Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.Native.arbitraryJavaVisibility(), org.zwobble.hobgoblin.compiler.output.lang.java.ast.Native.arbitraryJavaTypeRef(), "");
+ }
+
+ public record Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaVisibility visibility, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type, String name) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration(visibility, type, name);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration.Builder withVisibility(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaVisibility visibility) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration.Builder(visibility, type, name);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration.Builder withType(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration.Builder(visibility, type, name);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration.Builder withName(String name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration.Builder(visibility, type, name);
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaIntegerLiteral.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaIntegerLiteral.java
index 0f0342d..575d8eb 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaIntegerLiteral.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaIntegerLiteral.java
@@ -1,4 +1,25 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public record JavaIntegerLiteral(long value) implements JavaExpression {
+public record JavaIntegerLiteral(long value) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral.Builder(0);
+ }
+
+ public record Builder(long value) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral(value);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral.Builder withValue(long value) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral.Builder(value);
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaInterfaceDeclaration.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaInterfaceDeclaration.java
index e3780c7..8e9fc6b 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaInterfaceDeclaration.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaInterfaceDeclaration.java
@@ -1,15 +1,49 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-import org.zwobble.hobgoblin.compiler.ast.DocComment;
+public record JavaInterfaceDeclaration(String name, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceOpenness openness, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> permitsTypes, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration> body, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea customArea, org.zwobble.hobgoblin.compiler.ast.DocComment docComment) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeDeclaration, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder("", org.zwobble.hobgoblin.compiler.output.lang.java.ast.Native.arbitraryJavaInterfaceOpenness(), java.util.List.of(), java.util.List.of(), org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea.arbitrary().build(), org.zwobble.hobgoblin.compiler.output.lang.java.ast.Native.arbitraryDocComment());
+ }
+
+ public record Builder(String name, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceOpenness openness, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> permitsTypes, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration> body, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea customArea, org.zwobble.hobgoblin.compiler.ast.DocComment docComment) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeDeclaration.Builder, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration(name, openness, permitsTypes, body, customArea, docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder withName(String name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder(name, openness, permitsTypes, body, customArea, docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder withOpenness(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceOpenness openness) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder(name, openness, permitsTypes, body, customArea, docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder withPermitsTypes(java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> permitsTypes) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder(name, openness, permitsTypes, body, customArea, docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder withBody(java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration> body) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder(name, openness, permitsTypes, body, customArea, docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder withCustomArea(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea customArea) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder(name, openness, permitsTypes, body, customArea, docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder withCustomArea(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea.Builder customArea) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder(name, openness, permitsTypes, body, customArea.build(), docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder withDocComment(org.zwobble.hobgoblin.compiler.ast.DocComment docComment) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder(name, openness, permitsTypes, body, customArea, docComment);
+ }
-import java.util.List;
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration.Builder body
+ }
-public record JavaInterfaceDeclaration(
- String name,
- JavaInterfaceOpenness openness,
- List<JavaTypeRef> permitsTypes,
- List<JavaClassBodyDeclaration> body,
- JavaCustomArea customArea,
- DocComment docComment
-) implements JavaTypeDeclaration {
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodCall.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodCall.java
index 6ec7caf..24841c3 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodCall.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodCall.java
@@ -1,10 +1,37 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-import java.util.List;
+public record JavaMethodCall(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression receiver, String methodName, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression> args) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall.Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral.arbitrary().build(), "", java.util.List.of());
+ }
+
+ public record Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression receiver, String methodName, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression> args) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall(receiver, methodName, args);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall.Builder withReceiver(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression receiver) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall.Builder(receiver, methodName, args);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall.Builder withReceiver(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder receiver) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall.Builder(receiver.build(), methodName, args);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall.Builder withMethodName(String methodName) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall.Builder(receiver, methodName, args);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall.Builder withArgs(java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression> args) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall.Builder(receiver, methodName, args);
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall.Builder body
+ }
-public record JavaMethodCall(
- JavaExpression receiver,
- String methodName,
- List<JavaExpression> args
-) implements JavaExpression {
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall 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 dc5954c..b6b5043 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
@@ -1,22 +1,52 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-import java.util.List;
-import java.util.Optional;
-
-public record JavaMethodDeclaration(
- String name,
- JavaVisibility visibility,
- JavaMethodKind kind,
- JavaTypeRef returnType,
- List<JavaParam> params,
- Optional<JavaBlock> body
-) implements JavaClassBodyDeclaration {
+public record JavaMethodDeclaration(String 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<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam> params, java.util.Optional<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock> 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.Native.arbitraryJavaVisibility(), org.zwobble.hobgoblin.compiler.output.lang.java.ast.Native.arbitraryJavaMethodKind(), org.zwobble.hobgoblin.compiler.output.lang.java.ast.Native.arbitraryJavaTypeRef(), java.util.List.of(), java.util.Optional.empty());
+ }
+
+ public record Builder(String 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<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam> params, java.util.Optional<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock> 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, body);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder withName(String name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder(name, visibility, kind, returnType, params, body);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder withVisibility(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaVisibility visibility) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder(name, visibility, kind, returnType, params, body);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder withKind(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodKind kind) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder(name, visibility, kind, returnType, params, body);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder withReturnType(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef returnType) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder(name, visibility, kind, returnType, params, body);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder withParams(java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam> params) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder(name, visibility, kind, returnType, params, body);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder withBody(java.util.Optional<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock> body) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder(name, visibility, kind, returnType, params, body);
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration body
public JavaMethodDeclaration(
String name,
JavaVisibility visibility,
JavaMethodKind kind,
JavaTypeRef returnType,
- List<JavaParam> params,
+ java.util.List<JavaParam> params,
JavaBlock body
) {
this(
@@ -25,7 +55,8 @@ public record JavaMethodDeclaration(
kind,
returnType,
params,
- Optional.of(body)
+ java.util.Optional.of(body)
);
}
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodRef.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodRef.java
index b100804..b03fe15 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodRef.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodRef.java
@@ -1,4 +1,29 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public record JavaMethodRef(JavaTypeRef type, String methodName) implements JavaExpression {
+public record JavaMethodRef(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type, String methodName) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef.Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.Native.arbitraryJavaTypeRef(), "");
+ }
+
+ public record Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type, String methodName) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef(type, methodName);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef.Builder withType(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef.Builder(type, methodName);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef.Builder withMethodName(String methodName) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef.Builder(type, methodName);
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNewExpression.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNewExpression.java
index b6852bf..b69f544 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNewExpression.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNewExpression.java
@@ -1,9 +1,29 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-import java.util.List;
+public record JavaNewExpression(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression> args) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression.Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.Native.arbitraryJavaTypeRef(), java.util.List.of());
+ }
+
+ public record Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression> args) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression(type, args);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression.Builder withType(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression.Builder(type, args);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression.Builder withArgs(java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression> args) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression.Builder(type, args);
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression.Builder body
+ }
-public record JavaNewExpression(
- JavaTypeRef type,
- List<JavaExpression> args
-) implements JavaExpression {
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNullLiteral.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNullLiteral.java
index 3ce68eb..e0f11fd 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNullLiteral.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNullLiteral.java
@@ -1,4 +1,21 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public record JavaNullLiteral() implements JavaExpression {
+public record JavaNullLiteral() implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNullLiteral.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNullLiteral.Builder();
+ }
+
+ public record Builder() implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNullLiteral build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNullLiteral();
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNullLiteral.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNullLiteral.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNullLiteral body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNullLiteral body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaParam.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaParam.java
index 49a7f5f..75c3534 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaParam.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaParam.java
@@ -1,7 +1,29 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public record JavaParam(
- JavaTypeRef type,
- String name
-) {
+public record JavaParam(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type, String name) {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam.Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.Native.arbitraryJavaTypeRef(), "");
+ }
+
+ public record Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type, String name) {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam(type, name);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam.Builder withType(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam.Builder(type, name);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam.Builder withName(String name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam.Builder(type, name);
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordComponent.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordComponent.java
index ba95357..e3bd593 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordComponent.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordComponent.java
@@ -1,4 +1,29 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public record JavaRecordComponent(JavaTypeRef type, String name) {
+public record JavaRecordComponent(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type, String name) {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent.Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.Native.arbitraryJavaTypeRef(), "");
+ }
+
+ public record Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type, String name) {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent(type, name);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent.Builder withType(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent.Builder(type, name);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent.Builder withName(String name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent.Builder(type, name);
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordDeclaration.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordDeclaration.java
index 709d889..45a3bcf 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordDeclaration.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordDeclaration.java
@@ -1,15 +1,49 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-import org.zwobble.hobgoblin.compiler.ast.DocComment;
+public record JavaRecordDeclaration(String name, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent> components, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> implementsTypes, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration> body, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea customArea, org.zwobble.hobgoblin.compiler.ast.DocComment docComment) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeDeclaration, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder("", java.util.List.of(), java.util.List.of(), java.util.List.of(), org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea.arbitrary().build(), org.zwobble.hobgoblin.compiler.output.lang.java.ast.Native.arbitraryDocComment());
+ }
+
+ public record Builder(String name, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent> components, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> implementsTypes, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration> body, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea customArea, org.zwobble.hobgoblin.compiler.ast.DocComment docComment) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeDeclaration.Builder, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration(name, components, implementsTypes, body, customArea, docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder withName(String name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder(name, components, implementsTypes, body, customArea, docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder withComponents(java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent> components) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder(name, components, implementsTypes, body, customArea, docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder withImplementsTypes(java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> implementsTypes) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder(name, components, implementsTypes, body, customArea, docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder withBody(java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration> body) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder(name, components, implementsTypes, body, customArea, docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder withCustomArea(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea customArea) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder(name, components, implementsTypes, body, customArea, docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder withCustomArea(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea.Builder customArea) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder(name, components, implementsTypes, body, customArea.build(), docComment);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder withDocComment(org.zwobble.hobgoblin.compiler.ast.DocComment docComment) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder(name, components, implementsTypes, body, customArea, docComment);
+ }
-import java.util.List;
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration.Builder body
+ }
-public record JavaRecordDeclaration(
- String name,
- List<JavaRecordComponent> components,
- List<JavaTypeRef> implementsTypes,
- List<JavaClassBodyDeclaration> body,
- JavaCustomArea customArea,
- DocComment docComment
-) implements JavaTypeDeclaration {
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRef.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRef.java
index 0ccc05c..36c1005 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRef.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRef.java
@@ -1,4 +1,25 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public record JavaRef(String name) implements JavaExpression {
+public record JavaRef(String name) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRef.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRef.Builder("");
+ }
+
+ public record Builder(String name) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRef build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRef(name);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRef.Builder withName(String name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRef.Builder(name);
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRef.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRef.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRef body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRef body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaReturn.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaReturn.java
index f297f33..7c5691c 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaReturn.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaReturn.java
@@ -1,4 +1,29 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public record JavaReturn(JavaExpression value) implements JavaBlockStatement {
+public record JavaReturn(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression value) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockStatement {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturn.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturn.Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral.arbitrary().build());
+ }
+
+ public record Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression value) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockStatement.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturn build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturn(value);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturn.Builder withValue(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression value) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturn.Builder(value);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturn.Builder withValue(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder value) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturn.Builder(value.build());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturn.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturn.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturn body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturn body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticFieldAccess.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticFieldAccess.java
index 1a405d1..568a892 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticFieldAccess.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticFieldAccess.java
@@ -1,7 +1,29 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public record JavaStaticFieldAccess(
- JavaTypeRef type,
- String fieldName
-) implements JavaExpression {
+public record JavaStaticFieldAccess(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type, String fieldName) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess.Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.Native.arbitraryJavaTypeRef(), "");
+ }
+
+ public record Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type, String fieldName) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess(type, fieldName);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess.Builder withType(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess.Builder(type, fieldName);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess.Builder withFieldName(String fieldName) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess.Builder(type, fieldName);
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticMethodCall.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticMethodCall.java
index ec12861..2a3283b 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticMethodCall.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticMethodCall.java
@@ -1,10 +1,33 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-import java.util.List;
+public record JavaStaticMethodCall(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type, String methodName, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression> args) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall.Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.Native.arbitraryJavaTypeRef(), "", java.util.List.of());
+ }
+
+ public record Builder(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type, String methodName, java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression> args) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall(type, methodName, args);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall.Builder withType(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef type) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall.Builder(type, methodName, args);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall.Builder withMethodName(String methodName) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall.Builder(type, methodName, args);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall.Builder withArgs(java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression> args) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall.Builder(type, methodName, args);
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall.Builder body
+ }
-public record JavaStaticMethodCall(
- JavaTypeRef type,
- String methodName,
- List<JavaExpression> args
-) implements JavaExpression {
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStringLiteral.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStringLiteral.java
index 28fc5d7..b97df72 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStringLiteral.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStringLiteral.java
@@ -1,4 +1,25 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public record JavaStringLiteral(String value) implements JavaExpression {
+public record JavaStringLiteral(String value) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteral.Builder arbitrary() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteral.Builder("");
+ }
+
+ public record Builder(String value) implements org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression.Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteral build() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteral(value);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteral.Builder withValue(String value) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteral.Builder(value);
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteral.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteral.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteral body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteral body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaTypeDeclaration.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaTypeDeclaration.java
index 0ad9dd2..1824efc 100644
--- a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaTypeDeclaration.java
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaTypeDeclaration.java
@@ -1,6 +1,17 @@
+// Generated by hobgoblin.
+
package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
-public sealed interface JavaTypeDeclaration extends JavaClassBodyDeclaration permits JavaClassDeclaration, JavaInterfaceDeclaration, JavaRecordDeclaration {
+public sealed interface JavaTypeDeclaration permits org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration, org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration {
+ public interface Builder {
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeDeclaration build();
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeDeclaration.Builder body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeDeclaration.Builder body
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeDeclaration body
String name();
JavaCustomArea customArea();
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeDeclaration body
}
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/Native.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/Native.java
new file mode 100644
index 0000000..fd23901
--- /dev/null
+++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/Native.java
@@ -0,0 +1,28 @@
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+import org.zwobble.hobgoblin.compiler.ast.DocComment;
+
+public class Native {
+ private Native() {
+ }
+
+ public static DocComment arbitraryDocComment() {
+ return DocComment.EMPTY;
+ }
+
+ public static JavaInterfaceOpenness arbitraryJavaInterfaceOpenness() {
+ return JavaInterfaceOpenness.OPEN;
+ }
+
+ public static JavaMethodKind arbitraryJavaMethodKind() {
+ return JavaMethodKind.INSTANCE;
+ }
+
+ public static JavaTypeRef arbitraryJavaTypeRef() {
+ return JavaTypeRef.INT;
+ }
+
+ public static JavaVisibility arbitraryJavaVisibility() {
+ return JavaVisibility.PRIVATE;
+ }
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaAssignmentMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaAssignmentMatcher.java
new file mode 100644
index 0000000..35de602
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaAssignmentMatcher.java
@@ -0,0 +1,38 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaAssignmentMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignmentMatcher isJavaAssignment() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignmentMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment>> submatchers;
+
+ private JavaAssignmentMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignmentMatcher withLeft(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression> left) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignmentMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("left", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment::left, left))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignmentMatcher withRight(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression> right) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignmentMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("right", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignment::right, right))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignmentMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaAssignmentMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaBlockMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaBlockMatcher.java
new file mode 100644
index 0000000..baf0c20
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaBlockMatcher.java
@@ -0,0 +1,34 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaBlockMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockMatcher isJavaBlock() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock>> submatchers;
+
+ private JavaBlockMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockMatcher withStatements(org.zwobble.precisely.Matcher<? super java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockStatement>> statements) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("statements", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock::statements, statements))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlockMatcher body
+}
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
new file mode 100644
index 0000000..7461fdd
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaClassDeclarationMatcher.java
@@ -0,0 +1,50 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaClassDeclarationMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher isJavaClassDeclaration() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration>> submatchers;
+
+ private JavaClassDeclarationMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ 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 String> name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("name", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration::name, name))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher withImplementsTypes(org.zwobble.precisely.Matcher<? super java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef>> implementsTypes) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("implementsTypes", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration::implementsTypes, implementsTypes))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher withBody(org.zwobble.precisely.Matcher<? super java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration>> body) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("body", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration::body, body))).toList());
+ }
+
+ 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) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("customArea", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration::customArea, customArea))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher withDocComment(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.ast.DocComment> docComment) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("docComment", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclaration::docComment, docComment))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassDeclarationMatcher body
+}
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
new file mode 100644
index 0000000..b2c3f8e
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCompilationUnitMatcher.java
@@ -0,0 +1,38 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaCompilationUnitMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnitMatcher isJavaCompilationUnit() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnitMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit>> submatchers;
+
+ private JavaCompilationUnitMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ 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 java.util.List<String>> packageName) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnitMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("packageName", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit::packageName, packageName))).toList());
+ }
+
+ 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) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnitMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("typeDeclaration", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnit::typeDeclaration, typeDeclaration))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnitMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCompilationUnitMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaConstructorDeclarationMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaConstructorDeclarationMatcher.java
new file mode 100644
index 0000000..f755820
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaConstructorDeclarationMatcher.java
@@ -0,0 +1,46 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaConstructorDeclarationMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclarationMatcher isJavaConstructorDeclaration() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclarationMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration>> submatchers;
+
+ private JavaConstructorDeclarationMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclarationMatcher withTypeName(org.zwobble.precisely.Matcher<? super String> typeName) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("typeName", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration::typeName, typeName))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclarationMatcher withVisibility(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaVisibility> visibility) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("visibility", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration::visibility, visibility))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclarationMatcher withParams(org.zwobble.precisely.Matcher<? super java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam>> params) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("params", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration::params, params))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclarationMatcher withBody(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock> body) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("body", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclaration::body, body))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclarationMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaConstructorDeclarationMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCustomAreaMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCustomAreaMatcher.java
new file mode 100644
index 0000000..4b2d5a5
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaCustomAreaMatcher.java
@@ -0,0 +1,38 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaCustomAreaMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomAreaMatcher isJavaCustomArea() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomAreaMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea>> submatchers;
+
+ private JavaCustomAreaMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomAreaMatcher withType(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> type) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomAreaMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("type", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea::type, type))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomAreaMatcher withName(org.zwobble.precisely.Matcher<? super String> name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomAreaMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("name", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomArea::name, name))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomAreaMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaCustomAreaMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaExpressionStatementMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaExpressionStatementMatcher.java
new file mode 100644
index 0000000..1b1b97f
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaExpressionStatementMatcher.java
@@ -0,0 +1,34 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaExpressionStatementMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatementMatcher isJavaExpressionStatement() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatementMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatement>> submatchers;
+
+ private JavaExpressionStatementMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatement>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatement.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatementMatcher withExpression(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression> expression) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatementMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("expression", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatement::expression, expression))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatementMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpressionStatementMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldAccessMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldAccessMatcher.java
new file mode 100644
index 0000000..c716d82
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldAccessMatcher.java
@@ -0,0 +1,38 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaFieldAccessMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccessMatcher isJavaFieldAccess() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccessMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess>> submatchers;
+
+ private JavaFieldAccessMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccessMatcher withReceiver(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression> receiver) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccessMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("receiver", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess::receiver, receiver))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccessMatcher withFieldName(org.zwobble.precisely.Matcher<? super String> fieldName) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccessMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("fieldName", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccess::fieldName, fieldName))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccessMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldAccessMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldDeclarationMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldDeclarationMatcher.java
new file mode 100644
index 0000000..303c088
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaFieldDeclarationMatcher.java
@@ -0,0 +1,42 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaFieldDeclarationMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclarationMatcher isJavaFieldDeclaration() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclarationMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration>> submatchers;
+
+ private JavaFieldDeclarationMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclarationMatcher withVisibility(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaVisibility> visibility) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("visibility", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration::visibility, visibility))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclarationMatcher withType(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> type) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("type", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration::type, type))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclarationMatcher withName(org.zwobble.precisely.Matcher<? super String> name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("name", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclaration::name, name))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclarationMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaFieldDeclarationMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaIntegerLiteralMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaIntegerLiteralMatcher.java
new file mode 100644
index 0000000..8136524
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaIntegerLiteralMatcher.java
@@ -0,0 +1,34 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaIntegerLiteralMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteralMatcher isJavaIntegerLiteral() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteralMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral>> submatchers;
+
+ private JavaIntegerLiteralMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteralMatcher withValue(org.zwobble.precisely.Matcher<? super java.lang.Long> value) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteralMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("value", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteral::value, value))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteralMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaIntegerLiteralMatcher body
+}
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
new file mode 100644
index 0000000..0d8aef6
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaInterfaceDeclarationMatcher.java
@@ -0,0 +1,54 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaInterfaceDeclarationMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher isJavaInterfaceDeclaration() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration>> submatchers;
+
+ private JavaInterfaceDeclarationMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ 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 String> name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("name", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration::name, name))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher withOpenness(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceOpenness> openness) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("openness", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration::openness, openness))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher withPermitsTypes(org.zwobble.precisely.Matcher<? super java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef>> permitsTypes) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("permitsTypes", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration::permitsTypes, permitsTypes))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher withBody(org.zwobble.precisely.Matcher<? super java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration>> body) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("body", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration::body, body))).toList());
+ }
+
+ 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) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("customArea", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration::customArea, customArea))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher withDocComment(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.ast.DocComment> docComment) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("docComment", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclaration::docComment, docComment))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaInterfaceDeclarationMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodCallMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodCallMatcher.java
new file mode 100644
index 0000000..da2bc52
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodCallMatcher.java
@@ -0,0 +1,42 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaMethodCallMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCallMatcher isJavaMethodCall() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCallMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall>> submatchers;
+
+ private JavaMethodCallMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCallMatcher withReceiver(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression> receiver) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCallMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("receiver", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall::receiver, receiver))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCallMatcher withMethodName(org.zwobble.precisely.Matcher<? super String> methodName) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCallMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("methodName", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall::methodName, methodName))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCallMatcher withArgs(org.zwobble.precisely.Matcher<? super java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression>> args) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCallMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("args", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCall::args, args))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCallMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodCallMatcher body
+}
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
new file mode 100644
index 0000000..69ae9b6
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodDeclarationMatcher.java
@@ -0,0 +1,54 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaMethodDeclarationMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher isJavaMethodDeclaration() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration>> submatchers;
+
+ private JavaMethodDeclarationMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher withName(org.zwobble.precisely.Matcher<? super String> name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("name", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration::name, name))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher withVisibility(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaVisibility> visibility) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("visibility", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration::visibility, visibility))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher withKind(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodKind> kind) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("kind", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration::kind, kind))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher withReturnType(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> returnType) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("returnType", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration::returnType, returnType))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher withParams(org.zwobble.precisely.Matcher<? super java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam>> params) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("params", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration::params, params))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher withBody(org.zwobble.precisely.Matcher<? super java.util.Optional<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaBlock>> body) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("body", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclaration::body, body))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodDeclarationMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodRefMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodRefMatcher.java
new file mode 100644
index 0000000..ecbf83b
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaMethodRefMatcher.java
@@ -0,0 +1,38 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaMethodRefMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRefMatcher isJavaMethodRef() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRefMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef>> submatchers;
+
+ private JavaMethodRefMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRefMatcher withType(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> type) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRefMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("type", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef::type, type))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRefMatcher withMethodName(org.zwobble.precisely.Matcher<? super String> methodName) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRefMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("methodName", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRef::methodName, methodName))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRefMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaMethodRefMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNewExpressionMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNewExpressionMatcher.java
new file mode 100644
index 0000000..1feefe5
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNewExpressionMatcher.java
@@ -0,0 +1,38 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaNewExpressionMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpressionMatcher isJavaNewExpression() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpressionMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression>> submatchers;
+
+ private JavaNewExpressionMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpressionMatcher withType(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> type) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpressionMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("type", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression::type, type))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpressionMatcher withArgs(org.zwobble.precisely.Matcher<? super java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression>> args) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpressionMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("args", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpression::args, args))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpressionMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNewExpressionMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNullLiteralMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNullLiteralMatcher.java
new file mode 100644
index 0000000..033f432
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaNullLiteralMatcher.java
@@ -0,0 +1,30 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaNullLiteralMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNullLiteralMatcher isJavaNullLiteral() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNullLiteralMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNullLiteral>> submatchers;
+
+ private JavaNullLiteralMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNullLiteral>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNullLiteral.class, this.submatchers);
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNullLiteralMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaNullLiteralMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaParamMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaParamMatcher.java
new file mode 100644
index 0000000..52cc589
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaParamMatcher.java
@@ -0,0 +1,38 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaParamMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParamMatcher isJavaParam() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParamMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam>> submatchers;
+
+ private JavaParamMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParamMatcher withType(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> type) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParamMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("type", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam::type, type))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParamMatcher withName(org.zwobble.precisely.Matcher<? super String> name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParamMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("name", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParam::name, name))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParamMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaParamMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordComponentMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordComponentMatcher.java
new file mode 100644
index 0000000..9b97101
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordComponentMatcher.java
@@ -0,0 +1,38 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaRecordComponentMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponentMatcher isJavaRecordComponent() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponentMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent>> submatchers;
+
+ private JavaRecordComponentMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponentMatcher withType(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> type) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponentMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("type", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent::type, type))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponentMatcher withName(org.zwobble.precisely.Matcher<? super String> name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponentMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("name", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent::name, name))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponentMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponentMatcher body
+}
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
new file mode 100644
index 0000000..f937cf7
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRecordDeclarationMatcher.java
@@ -0,0 +1,54 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaRecordDeclarationMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher isJavaRecordDeclaration() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration>> submatchers;
+
+ private JavaRecordDeclarationMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ 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 String> name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("name", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration::name, name))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher withComponents(org.zwobble.precisely.Matcher<? super java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordComponent>> components) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("components", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration::components, components))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher withImplementsTypes(org.zwobble.precisely.Matcher<? super java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef>> implementsTypes) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("implementsTypes", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration::implementsTypes, implementsTypes))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher withBody(org.zwobble.precisely.Matcher<? super java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaClassBodyDeclaration>> body) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("body", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration::body, body))).toList());
+ }
+
+ 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) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("customArea", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration::customArea, customArea))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher withDocComment(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.ast.DocComment> docComment) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("docComment", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclaration::docComment, docComment))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRecordDeclarationMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRefMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRefMatcher.java
new file mode 100644
index 0000000..cc68447
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaRefMatcher.java
@@ -0,0 +1,34 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaRefMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRefMatcher isJavaRef() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRefMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRef>> submatchers;
+
+ private JavaRefMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRef>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRef.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRefMatcher withName(org.zwobble.precisely.Matcher<? super String> name) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRefMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("name", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRef::name, name))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRefMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaRefMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaReturnMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaReturnMatcher.java
new file mode 100644
index 0000000..2614074
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaReturnMatcher.java
@@ -0,0 +1,34 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaReturnMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturnMatcher isJavaReturn() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturnMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturn>> submatchers;
+
+ private JavaReturnMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturn>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturn.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturnMatcher withValue(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression> value) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturnMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("value", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturn::value, value))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturnMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaReturnMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticFieldAccessMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticFieldAccessMatcher.java
new file mode 100644
index 0000000..d66288e
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticFieldAccessMatcher.java
@@ -0,0 +1,38 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaStaticFieldAccessMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccessMatcher isJavaStaticFieldAccess() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccessMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess>> submatchers;
+
+ private JavaStaticFieldAccessMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccessMatcher withType(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> type) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccessMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("type", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess::type, type))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccessMatcher withFieldName(org.zwobble.precisely.Matcher<? super String> fieldName) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccessMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("fieldName", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccess::fieldName, fieldName))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccessMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticFieldAccessMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticMethodCallMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticMethodCallMatcher.java
new file mode 100644
index 0000000..1837a34
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStaticMethodCallMatcher.java
@@ -0,0 +1,42 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaStaticMethodCallMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCallMatcher isJavaStaticMethodCall() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCallMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall>> submatchers;
+
+ private JavaStaticMethodCallMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCallMatcher withType(org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaTypeRef> type) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCallMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("type", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall::type, type))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCallMatcher withMethodName(org.zwobble.precisely.Matcher<? super String> methodName) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCallMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("methodName", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall::methodName, methodName))).toList());
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCallMatcher withArgs(org.zwobble.precisely.Matcher<? super java.util.List<org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaExpression>> args) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCallMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("args", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCall::args, args))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCallMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStaticMethodCallMatcher body
+}
diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStringLiteralMatcher.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStringLiteralMatcher.java
new file mode 100644
index 0000000..2656b17
--- /dev/null
+++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/ast/JavaStringLiteralMatcher.java
@@ -0,0 +1,34 @@
+// Generated by hobgoblin.
+
+package org.zwobble.hobgoblin.compiler.output.lang.java.ast;
+
+public class JavaStringLiteralMatcher implements org.zwobble.precisely.Matcher<java.lang.Object> {
+ public static org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteralMatcher isJavaStringLiteral() {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteralMatcher(java.util.List.of());
+ }
+
+ private final java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteral>> submatchers;
+
+ private JavaStringLiteralMatcher(java.util.List<org.zwobble.precisely.Matcher<? super org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteral>> submatchers) {
+ this.submatchers = submatchers;
+ }
+
+ public org.zwobble.precisely.MatchResult match(java.lang.Object actual) {
+ return this.toMatcher().match(actual);
+ }
+
+ public org.zwobble.precisely.TextTree describe() {
+ return this.toMatcher().describe();
+ }
+
+ private org.zwobble.precisely.Matcher<java.lang.Object> toMatcher() {
+ return org.zwobble.precisely.Matchers.instanceOf(org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteral.class, this.submatchers);
+ }
+
+ public org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteralMatcher withValue(org.zwobble.precisely.Matcher<? super String> value) {
+ return new org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteralMatcher(java.util.stream.Stream.concat(this.submatchers.stream(), java.util.stream.Stream.of(org.zwobble.precisely.Matchers.has("value", org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteral::value, value))).toList());
+ }
+
+ // Custom area start: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteralMatcher body
+ // Custom area end: org.zwobble.hobgoblin.compiler.output.lang.java.ast.JavaStringLiteralMatcher body
+}