diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javapreciselymatchers/JavaPreciselyMatchersGenerator.java | 17 |
1 files changed, 17 insertions, 0 deletions
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 6849387..b304d5a 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 @@ -18,6 +18,8 @@ import java.nio.file.Path; import java.util.ArrayList; import java.util.List; +import static org.zwobble.hobgoblin.compiler.util.Casing.lowerCamelCaseToUpperCamelCase; + public class JavaPreciselyMatchersGenerator implements Generator { public static final String NAME = "java-precisely-matchers"; @@ -104,6 +106,21 @@ public class JavaPreciselyMatchersGenerator implements Generator { ) ), List.of( + new JavaMethodDeclaration( + "is" + lowerCamelCaseToUpperCamelCase(structDefinition.name()), + JavaVisibility.PUBLIC, + JavaMethodKind.STATIC, + javaMatcherTypeRef, + List.of(), + new JavaBlock(List.of( + new JavaReturn(new JavaNewExpression( + javaMatcherTypeRef, + List.of( + new JavaStaticMethodCall(JavaTypeRef.LIST, "of", List.of()) + ) + )) + )) + ), new JavaConstructorDeclaration( matcherTypeName, JavaVisibility.PRIVATE, |
