From eecbcb0299398bd9052ddb8835d368e28f5c895f Mon Sep 17 00:00:00 2001 From: glelouet Date: Tue, 3 Feb 2026 21:16:25 +0100 Subject: [PATCH 01/14] working on #129 --- jcodemodeltests/pom.xml | 48 ++++++++ .../jcodemodel/tests/basic/Simple1.java | 4 + .../jcodemodel/tests/basic/Simple2.java | 4 + .../compile/annotation/GenerateTestFiles.java | 112 ++++++++++++++++++ .../compile/annotation/TestJCM.java | 12 ++ .../tests/SimpleClassGenerating.java | 27 +++++ pom.xml | 1 + 7 files changed, 208 insertions(+) create mode 100644 jcodemodeltests/pom.xml create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/Simple1.java create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/Simple2.java create mode 100644 jcodemodeltests/src/main/java/com/helger/jcodemodel/compile/annotation/GenerateTestFiles.java create mode 100644 jcodemodeltests/src/main/java/com/helger/jcodemodel/compile/annotation/TestJCM.java create mode 100644 jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/SimpleClassGenerating.java diff --git a/jcodemodeltests/pom.xml b/jcodemodeltests/pom.xml new file mode 100644 index 00000000..dd62fa01 --- /dev/null +++ b/jcodemodeltests/pom.xml @@ -0,0 +1,48 @@ + + 4.0.0 + + com.helger.jcodemodel + jcodemodel-parent-pom + 4.2.0-SNAPSHOT + + JCodeModel-Tests + + + + com.helger + jcodemodel + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.6.1 + + + add-test-source + generate-test-sources + + add-test-source + + + + src/generated/javatest + + + + + + + org.codehaus.mojo + exec-maven-plugin + + com.helger.jcodemodel.compile.annotation.GenerateTestFiles + + + + + + \ No newline at end of file diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/Simple1.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/Simple1.java new file mode 100644 index 00000000..5430b459 --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/Simple1.java @@ -0,0 +1,4 @@ +package com.helger.jcodemodel.tests.basic; + +public class Simple1 { +} diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/Simple2.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/Simple2.java new file mode 100644 index 00000000..0e8eb028 --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/Simple2.java @@ -0,0 +1,4 @@ +package com.helger.jcodemodel.tests.basic; + +public class Simple2 { +} diff --git a/jcodemodeltests/src/main/java/com/helger/jcodemodel/compile/annotation/GenerateTestFiles.java b/jcodemodeltests/src/main/java/com/helger/jcodemodel/compile/annotation/GenerateTestFiles.java new file mode 100644 index 00000000..f43f716c --- /dev/null +++ b/jcodemodeltests/src/main/java/com/helger/jcodemodel/compile/annotation/GenerateTestFiles.java @@ -0,0 +1,112 @@ +package com.helger.jcodemodel.compile.annotation; + +import java.io.File; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Stream; + +import com.helger.jcodemodel.JCodeModel; +import com.helger.jcodemodel.writer.JCMWriter; +import com.helger.jcodemodel.writer.ProgressCodeWriter.IProgressTracker; + +public class GenerateTestFiles { + + private static final String OUTPUT_DIR = "src/generated/javatest"; + + private static final String CLASS_SCAN_DIR = "src/main/java"; + + private final File outputDir; + + private final File classScanDir; + + public GenerateTestFiles(File outputDir, File classScanDir) { + this.outputDir = outputDir; + this.classScanDir = classScanDir; + } + + void apply() { + delete(outputDir); + outputDir.mkdirs(); + scanClasses(classScanDir).forEach(this::applyCandidateClass); + + } + + public static void main(String[] args) { + File outputFile = new File(OUTPUT_DIR); + File classScanDir = new File(CLASS_SCAN_DIR); + new GenerateTestFiles(outputFile, classScanDir).apply(); + + } + + static void delete(File file) { + if (file.isDirectory()) { + for (File sub : file.listFiles()) { + delete(sub); + } + } + file.delete(); + } + + Stream scanClasses(File rootDir) { + return scanClasses(rootDir, "", Stream.of()); + } + + Stream scanClasses(File dir, String packageName , Stream stream) { + List newFound = new ArrayList<>(); + for(File child : dir.listFiles()) { + if(child.isDirectory()) { + stream = scanClasses(child, (packageName.isEmpty() ? "" : packageName + ".") + child.getName(), stream); + + } else if(child.isFile() && child.getName().endsWith(".java")) { + newFound.add(packageName + "." + child.getName().replace(".java", "")); + } + } + if (!newFound.isEmpty()) { + stream = Stream.concat(stream, newFound.stream()); + } + return stream; + } + + void applyCandidateClass(String className) { + Class clazz; + try { + clazz = Class.forName(className); + if (clazz.getAnnotation(TestJCM.class) != null) { + runGeneration(clazz); + } + } catch (ClassNotFoundException | IllegalAccessException | IllegalArgumentException + | InvocationTargetException | InstantiationException | NoSuchMethodException | SecurityException + | IOException e) { + throw new RuntimeException(e); + } + } + + private void runGeneration(Class clazz) + throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, InstantiationException, + NoSuchMethodException, SecurityException, IOException { + for (Method m : clazz.getDeclaredMethods()) { + // only apply to methods public, with 0 args, and that produce a JCodeModel + if ((m.getModifiers() & Modifier.PUBLIC) > 0 + && m.getParameterCount() == 0) { + if (m.getReturnType().equals(JCodeModel.class)) { + m.setAccessible(true); + JCodeModel produced = null; + if ((m.getModifiers() & Modifier.STATIC) > 0) { + produced = (JCodeModel) m.invoke(null); + } else { + Object inst = clazz.getDeclaredConstructor().newInstance(); + produced = (JCodeModel) m.invoke(inst); + } + if (produced != null) { + new JCMWriter(produced).build(outputDir, (IProgressTracker) null); + } + } + } + } + } + +} diff --git a/jcodemodeltests/src/main/java/com/helger/jcodemodel/compile/annotation/TestJCM.java b/jcodemodeltests/src/main/java/com/helger/jcodemodel/compile/annotation/TestJCM.java new file mode 100644 index 00000000..e10bc6dd --- /dev/null +++ b/jcodemodeltests/src/main/java/com/helger/jcodemodel/compile/annotation/TestJCM.java @@ -0,0 +1,12 @@ +package com.helger.jcodemodel.compile.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface TestJCM { + +} diff --git a/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/SimpleClassGenerating.java b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/SimpleClassGenerating.java new file mode 100644 index 00000000..109c4cd7 --- /dev/null +++ b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/SimpleClassGenerating.java @@ -0,0 +1,27 @@ +package com.helger.jcodemodel.tests; + +import com.helger.jcodemodel.JCodeModel; +import com.helger.jcodemodel.compile.annotation.TestJCM; +import com.helger.jcodemodel.exceptions.JCodeModelException; + +@TestJCM +public class SimpleClassGenerating { + + public JCodeModel createSimple1() throws JCodeModelException { + JCodeModel cm = new JCodeModel(); + cm._class("com.helger.jcodemodel.tests.basic.Simple1"); + return cm; + } + + public JCodeModel createSimple2() throws JCodeModelException { + JCodeModel cm = new JCodeModel(); + cm._class("com.helger.jcodemodel.tests.basic.Simple2"); + return cm; + } + + /** protected so should not be selected */ + protected JCodeModel protectedCall() { + return null; + } + +} diff --git a/pom.xml b/pom.xml index 365da74d..387ef165 100644 --- a/pom.xml +++ b/pom.xml @@ -115,6 +115,7 @@ jcodemodel plugin examples + jcodemodeltests From 05107335e9eac029137d5f273f88a4d86f38d6d3 Mon Sep 17 00:00:00 2001 From: glelouet Date: Tue, 3 Feb 2026 22:01:08 +0100 Subject: [PATCH 02/14] changed exec phase #129 --- jcodemodeltests/pom.xml | 22 ++++++++++++-- .../compile/annotation/GenerateTestFiles.java | 29 +++++++++++-------- .../{ => basic}/SimpleClassGenerating.java | 2 +- .../jcodemodel/tests/basic/TestBasic.java | 13 +++++++++ 4 files changed, 50 insertions(+), 16 deletions(-) rename jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/{ => basic}/SimpleClassGenerating.java (94%) create mode 100644 jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/basic/TestBasic.java diff --git a/jcodemodeltests/pom.xml b/jcodemodeltests/pom.xml index dd62fa01..ccc3abb0 100644 --- a/jcodemodeltests/pom.xml +++ b/jcodemodeltests/pom.xml @@ -12,6 +12,11 @@ com.helger jcodemodel + + junit + junit + test + @@ -38,9 +43,20 @@ org.codehaus.mojo exec-maven-plugin - - com.helger.jcodemodel.compile.annotation.GenerateTestFiles - + 3.6.3 + + + generatetestfiles + generate-test-sources + + java + + + ${project.basedir} + com.helger.jcodemodel.compile.annotation.GenerateTestFiles + + + diff --git a/jcodemodeltests/src/main/java/com/helger/jcodemodel/compile/annotation/GenerateTestFiles.java b/jcodemodeltests/src/main/java/com/helger/jcodemodel/compile/annotation/GenerateTestFiles.java index f43f716c..dc3ff737 100644 --- a/jcodemodeltests/src/main/java/com/helger/jcodemodel/compile/annotation/GenerateTestFiles.java +++ b/jcodemodeltests/src/main/java/com/helger/jcodemodel/compile/annotation/GenerateTestFiles.java @@ -23,6 +23,15 @@ public class GenerateTestFiles { private final File classScanDir; + public static void main(String[] args) { + String rootPath = args == null || args.length == 0 ? "." : args[0]; + System.out.println("root is " + rootPath); + File outputFile = new File(rootPath, OUTPUT_DIR); + File classScanDir = new File(rootPath, CLASS_SCAN_DIR); + new GenerateTestFiles(outputFile, classScanDir) + .apply(); + } + public GenerateTestFiles(File outputDir, File classScanDir) { this.outputDir = outputDir; this.classScanDir = classScanDir; @@ -35,14 +44,7 @@ void apply() { } - public static void main(String[] args) { - File outputFile = new File(OUTPUT_DIR); - File classScanDir = new File(CLASS_SCAN_DIR); - new GenerateTestFiles(outputFile, classScanDir).apply(); - - } - - static void delete(File file) { + void delete(File file) { if (file.isDirectory()) { for (File sub : file.listFiles()) { delete(sub); @@ -55,13 +57,16 @@ Stream scanClasses(File rootDir) { return scanClasses(rootDir, "", Stream.of()); } - Stream scanClasses(File dir, String packageName , Stream stream) { + Stream scanClasses(File dir, String packageName, Stream stream) { List newFound = new ArrayList<>(); - for(File child : dir.listFiles()) { - if(child.isDirectory()) { + if(!dir.isDirectory()) { + throw new RuntimeException("file " + dir.getAbsolutePath() + " expected to be a dir"); + } + for (File child : dir.listFiles()) { + if (child.isDirectory()) { stream = scanClasses(child, (packageName.isEmpty() ? "" : packageName + ".") + child.getName(), stream); - } else if(child.isFile() && child.getName().endsWith(".java")) { + } else if (child.isFile() && child.getName().endsWith(".java")) { newFound.add(packageName + "." + child.getName().replace(".java", "")); } } diff --git a/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/SimpleClassGenerating.java b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/SimpleClassGenerating.java similarity index 94% rename from jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/SimpleClassGenerating.java rename to jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/SimpleClassGenerating.java index 109c4cd7..2b698ce5 100644 --- a/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/SimpleClassGenerating.java +++ b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/SimpleClassGenerating.java @@ -1,4 +1,4 @@ -package com.helger.jcodemodel.tests; +package com.helger.jcodemodel.tests.basic; import com.helger.jcodemodel.JCodeModel; import com.helger.jcodemodel.compile.annotation.TestJCM; diff --git a/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/basic/TestBasic.java b/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/basic/TestBasic.java new file mode 100644 index 00000000..1ae76d35 --- /dev/null +++ b/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/basic/TestBasic.java @@ -0,0 +1,13 @@ +package com.helger.jcodemodel.tests.basic; + +import org.junit.Test; + +public class TestBasic { + + @Test + public void testBasic() { + new Simple1(); + new Simple2(); + } + +} From dfb5df97bf1f1efb0a107b05f4bf95d9079c6c3b Mon Sep 17 00:00:00 2001 From: glelouet Date: Wed, 4 Feb 2026 16:46:16 +0100 Subject: [PATCH 03/14] starting migrating record test to test module --- .../com/helger/jcodemodel/JRecordTest.java | 48 ---------- .../tests/basic/record/BasicPoint.java | 4 + .../jcodemodel/tests/basic/record/Empty.java | 4 + .../jcodemodel/tests/basic/record/Person.java | 4 + .../compile/annotation/GenerateTestFiles.java | 1 - .../tests/basic/record/JRecordTestGen.java | 73 +++++++++++++++ .../jcodemodel/tests/record/JRecordTest.java | 90 +++++++++++++++++++ 7 files changed, 175 insertions(+), 49 deletions(-) create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/BasicPoint.java create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Empty.java create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Person.java create mode 100644 jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java create mode 100644 jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java diff --git a/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java b/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java index 1c03070e..291b4776 100644 --- a/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java +++ b/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java @@ -55,55 +55,7 @@ */ public final class JRecordTest { - /** - * Test: Basic record with two components Expected output: - * - *
-   * package org.example;
-   *
-   * public record Point (int x, int y)
-   * {}
-   * 
- * - * @throws JCodeModelException - * In case of error - */ - @Test - public void testBasicRecord () throws JCodeModelException - { - final JCodeModel cm = new JCodeModel (); - final JDefinedClass rec = cm._package ("org.example")._record ("Point"); - rec.recordComponent (cm.INT, "x"); - rec.recordComponent (cm.INT, "y"); - final String output = CodeModelTestsHelper.declare (rec); - assertTrue (output.contains ("record Point(int x, int y)")); - - CodeModelTestsHelper.parseCodeModel (cm); - } - - /** - * Test: Empty record (no components) Expected output: - * - *
-   * public record Empty ()
-   * {}
-   * 
- * - * @throws JCodeModelException - * In case of error - */ - @Test - public void testEmptyRecord () throws JCodeModelException - { - final JCodeModel cm = new JCodeModel (); - final JDefinedClass rec = cm._package ("org.example")._record ("Empty"); - - final String output = CodeModelTestsHelper.declare (rec); - assertTrue (output.contains ("record Empty()")); - - CodeModelTestsHelper.parseCodeModel (cm); - } /** * Test: Record with object type components Expected output: diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/BasicPoint.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/BasicPoint.java new file mode 100644 index 00000000..f7ad339e --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/BasicPoint.java @@ -0,0 +1,4 @@ +package com.helger.jcodemodel.tests.basic.record; + +public record BasicPoint(int x, int y) { +} diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Empty.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Empty.java new file mode 100644 index 00000000..0363a03b --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Empty.java @@ -0,0 +1,4 @@ +package com.helger.jcodemodel.tests.basic.record; + +public record Empty() { +} diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Person.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Person.java new file mode 100644 index 00000000..b1263c36 --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Person.java @@ -0,0 +1,4 @@ +package com.helger.jcodemodel.tests.basic.record; + +public record Person(String name, Integer age) { +} diff --git a/jcodemodeltests/src/main/java/com/helger/jcodemodel/compile/annotation/GenerateTestFiles.java b/jcodemodeltests/src/main/java/com/helger/jcodemodel/compile/annotation/GenerateTestFiles.java index dc3ff737..b765bebb 100644 --- a/jcodemodeltests/src/main/java/com/helger/jcodemodel/compile/annotation/GenerateTestFiles.java +++ b/jcodemodeltests/src/main/java/com/helger/jcodemodel/compile/annotation/GenerateTestFiles.java @@ -25,7 +25,6 @@ public class GenerateTestFiles { public static void main(String[] args) { String rootPath = args == null || args.length == 0 ? "." : args[0]; - System.out.println("root is " + rootPath); File outputFile = new File(rootPath, OUTPUT_DIR); File classScanDir = new File(rootPath, CLASS_SCAN_DIR); new GenerateTestFiles(outputFile, classScanDir) diff --git a/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java new file mode 100644 index 00000000..2f42009a --- /dev/null +++ b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java @@ -0,0 +1,73 @@ +package com.helger.jcodemodel.tests.basic.record; + +import com.helger.jcodemodel.JCodeModel; +import com.helger.jcodemodel.JDefinedClass; +import com.helger.jcodemodel.compile.annotation.TestJCM; +import com.helger.jcodemodel.exceptions.JCodeModelException; + +@TestJCM +public class JRecordTestGen { + + public final String rootPackage=getClass().getPackageName(); + + /** + * Test: Basic record with two components Expected output: + * + *
+   * package org.example;
+   *
+   * public record Point(int x, int y) {
+   * }
+   * 
+ * + * @throws JCodeModelException + * In case of error + */ + public JCodeModel genBasicRecord () throws JCodeModelException + { + final JCodeModel cm = new JCodeModel (); + final JDefinedClass rec = cm._package (rootPackage)._record ("BasicPoint"); + rec.recordComponent (cm.INT, "x"); + rec.recordComponent (cm.INT, "y"); + return cm; + } + + /** + * Test: Empty record (no components) Expected output: + * + *
+   * public record Empty ()
+   * {}
+   * 
+ * + * @throws JCodeModelException + * In case of error + */ + public JCodeModel genEmptyRecord () throws JCodeModelException + { + final JCodeModel cm = new JCodeModel (); + cm._package(rootPackage)._record("Empty"); + return cm; + } + + /** + * Test: Record with object type components Expected output: + * + *
+   * public record Person (String name, Integer age)
+   * {}
+   * 
+ * + * @throws JCodeModelException + * In case of error + */ + public JCodeModel genRecordWithObjectComponents () throws JCodeModelException + { + final JCodeModel cm = new JCodeModel (); + final JDefinedClass rec = cm._package (rootPackage)._record ("Person"); + rec.recordComponent (cm.ref (String.class), "name"); + rec.recordComponent (cm.ref (Integer.class), "age"); + return cm; + } + +} diff --git a/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java b/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java new file mode 100644 index 00000000..cb7c1865 --- /dev/null +++ b/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java @@ -0,0 +1,90 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. + * Portions Copyright 2013-2026 Philip Helger + contributors + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.helger.jcodemodel.tests.record; + +import org.junit.Assert; +import org.junit.Test; + +import com.helger.jcodemodel.exceptions.JCodeModelException; +import com.helger.jcodemodel.tests.basic.record.BasicPoint; +import com.helger.jcodemodel.tests.basic.record.Empty; +import com.helger.jcodemodel.tests.basic.record.JRecordTestGen; +import com.helger.jcodemodel.tests.basic.record.Person; + +/** + * Test class for Java record support. Java records (JEP 395, Java 16+) are a special kind of class + * that acts as a transparent carrier for immutable data. Records automatically provide: - A + * canonical constructor - Private final fields for each component - Public accessor methods for + * each component (same name as component) - equals(), hashCode(), and toString() implementations + */ +public final class JRecordTest +{ + + /** + * tests {@link JRecordTestGen#genBasicRecord()} + */ + @Test + public void testBasicRecord () throws JCodeModelException + { + BasicPoint test = new BasicPoint(2, 3); + Assert.assertTrue(test instanceof Record); + } + + /** + * tests {@link JRecordTestGen#genEmptyRecord()} + */ + @Test + public void testEmptyRecord() throws JCodeModelException + { + Empty test = new Empty(); + Assert.assertTrue(test instanceof Record); + } + + /** + * tests {@link JRecordTestGen#genRecordWithObjectComponents()} + */ + @Test + public void testRecordWithObjectComponents () throws JCodeModelException + { + Person test = new Person("John", 42); + Assert.assertTrue(test instanceof Record); + } +} From d86dbb6aa9941864af18878393cf0213f5541d41 Mon Sep 17 00:00:00 2001 From: glelouet Date: Wed, 4 Feb 2026 16:53:45 +0100 Subject: [PATCH 04/14] record implements interface needs to actually implement that interface --- .../com/helger/jcodemodel/JRecordTest.java | 49 ------------------- .../tests/basic/record/NamedPoint.java | 10 ++++ .../tests/basic/record/JRecordTestGen.java | 34 +++++++++++-- .../jcodemodel/tests/record/JRecordTest.java | 12 +++++ 4 files changed, 53 insertions(+), 52 deletions(-) create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/NamedPoint.java diff --git a/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java b/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java index 291b4776..b690b4ed 100644 --- a/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java +++ b/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java @@ -57,58 +57,9 @@ public final class JRecordTest { - /** - * Test: Record with object type components Expected output: - * - *
-   * public record Person (String name, Integer age)
-   * {}
-   * 
- * - * @throws JCodeModelException - * In case of error - */ - @Test - public void testRecordWithObjectComponents () throws JCodeModelException - { - final JCodeModel cm = new JCodeModel (); - final JDefinedClass rec = cm._package ("org.example")._record ("Person"); - rec.recordComponent (cm.ref (String.class), "name"); - rec.recordComponent (cm.ref (Integer.class), "age"); - final String output = CodeModelTestsHelper.declare (rec); - assertTrue (output.contains ("record Person(java.lang.String name, java.lang.Integer age)")); - CodeModelTestsHelper.parseCodeModel (cm); - } - /** - * Test: Record implementing an interface Expected output: - * - *
-   * public record NamedPoint (int x, int y, String name) implements Comparable <NamedPoint>
-   * {}
-   * 
- * - * @throws JCodeModelException - * In case of error - */ - @Test - public void testRecordImplementsInterface () throws JCodeModelException - { - final JCodeModel cm = new JCodeModel (); - final JDefinedClass rec = cm._package ("org.example")._record ("NamedPoint"); - rec.recordComponent (cm.INT, "x"); - rec.recordComponent (cm.INT, "y"); - rec.recordComponent (cm.ref (String.class), "name"); - rec._implements (cm.ref (Comparable.class).narrow (rec)); - - final String output = CodeModelTestsHelper.declare (rec); - assertTrue (output, output.contains ("record NamedPoint(int x, int y, java.lang.String name)")); - assertTrue (output.contains ("implements java.lang.Comparable")); - - CodeModelTestsHelper.parseCodeModel (cm); - } /** * Test: Generic record with type parameters Expected output: diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/NamedPoint.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/NamedPoint.java new file mode 100644 index 00000000..4445c4be --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/NamedPoint.java @@ -0,0 +1,10 @@ +package com.helger.jcodemodel.tests.basic.record; + +public record NamedPoint(int x, int y, String name) + implements Comparable +{ + + public int compareTo(NamedPoint other) { + return 0; + } +} diff --git a/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java index 2f42009a..5080f843 100644 --- a/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java +++ b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java @@ -2,6 +2,9 @@ import com.helger.jcodemodel.JCodeModel; import com.helger.jcodemodel.JDefinedClass; +import com.helger.jcodemodel.JExpr; +import com.helger.jcodemodel.JMethod; +import com.helger.jcodemodel.JMod; import com.helger.jcodemodel.compile.annotation.TestJCM; import com.helger.jcodemodel.exceptions.JCodeModelException; @@ -49,15 +52,15 @@ public JCodeModel genEmptyRecord () throws JCodeModelException cm._package(rootPackage)._record("Empty"); return cm; } - + /** * Test: Record with object type components Expected output: - * + * *
    * public record Person (String name, Integer age)
    * {}
    * 
- * + * * @throws JCodeModelException * In case of error */ @@ -70,4 +73,29 @@ public JCodeModel genRecordWithObjectComponents () throws JCodeModelException return cm; } + /** + * Test: Record implementing an interface Expected output: + * + *
+   * public record NamedPoint (int x, int y, String name) implements Comparable <NamedPoint>
+   * {}
+   * 
+ * + * @throws JCodeModelException + * In case of error + */ + public JCodeModel genRecordImplementsInterface () throws JCodeModelException + { + final JCodeModel cm = new JCodeModel (); + final JDefinedClass rec = cm._package (rootPackage)._record ("NamedPoint"); + rec.recordComponent (cm.INT, "x"); + rec.recordComponent (cm.INT, "y"); + rec.recordComponent (cm.ref (String.class), "name"); + rec._implements (cm.ref (Comparable.class).narrow (rec)); + JMethod cmp = rec.method(JMod.PUBLIC, cm.INT, "compareTo"); + cmp.param(rec, "other"); + cmp.body()._return(JExpr.lit(0)); + return cm; + } + } diff --git a/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java b/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java index cb7c1865..ff558159 100644 --- a/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java +++ b/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java @@ -47,6 +47,7 @@ import com.helger.jcodemodel.tests.basic.record.BasicPoint; import com.helger.jcodemodel.tests.basic.record.Empty; import com.helger.jcodemodel.tests.basic.record.JRecordTestGen; +import com.helger.jcodemodel.tests.basic.record.NamedPoint; import com.helger.jcodemodel.tests.basic.record.Person; /** @@ -87,4 +88,15 @@ public void testRecordWithObjectComponents () throws JCodeModelException Person test = new Person("John", 42); Assert.assertTrue(test instanceof Record); } + + /** + * tests {@link JRecordTestGen#genRecordImplementsInterface()} + */ + @Test + public void testRecordImplementsInterface() throws JCodeModelException + { + NamedPoint test = new NamedPoint(5, 10, "15"); + Assert.assertTrue(test instanceof Record); + Assert.assertTrue(test instanceof Comparable); + } } From e5970708e16e14765742cfe936e0756685852385 Mon Sep 17 00:00:00 2001 From: glelouet Date: Wed, 4 Feb 2026 17:32:05 +0100 Subject: [PATCH 05/14] moved two more record test cases in the test module Record are a bit tricky to work with annotations, as only annotations with @Target(RECORD_COMPONENT) AND @Retention(RUNTIME) can be transmitted ; plus they are transmitted only to record components, not fields, so need to use record components with reflect. --- .../com/helger/jcodemodel/JRecordTest.java | 51 ---------------- .../tests/basic/record/AnnotatedPerson.java | 4 ++ .../jcodemodel/tests/basic/record/Pair.java | 4 ++ .../tests/basic/record/JRecordTestGen.java | 59 +++++++++++++++++++ .../jcodemodel/tests/record/JRecordTest.java | 43 ++++++++++++++ 5 files changed, 110 insertions(+), 51 deletions(-) create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/AnnotatedPerson.java create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Pair.java diff --git a/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java b/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java index b690b4ed..e2e65431 100644 --- a/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java +++ b/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java @@ -61,60 +61,9 @@ public final class JRecordTest - /** - * Test: Generic record with type parameters Expected output: - * - *
-   * public record Pair <T, U> (T first, U second)
-   * {}
-   * 
- * - * @throws JCodeModelException - * In case of error - */ - @Test - public void testGenericRecord () throws JCodeModelException - { - final JCodeModel cm = new JCodeModel (); - final JDefinedClass rec = cm._package ("org.example")._record ("Pair"); - final JTypeVar t = rec.generify ("T"); - final JTypeVar u = rec.generify ("U"); - rec.recordComponent (t, "first"); - rec.recordComponent (u, "second"); - final String output = CodeModelTestsHelper.declare (rec); - assertTrue (output.contains ("record Pair(T first, U second)")); - CodeModelTestsHelper.parseCodeModel (cm); - } - /** - * Test: Record with annotated component Expected output: - * - *
-   * public record Person (@NonNull String name, int age)
-   * {}
-   * 
- * - * @throws JCodeModelException - * In case of error - */ - @Test - public void testRecordWithAnnotatedComponent () throws JCodeModelException - { - final JCodeModel cm = new JCodeModel (); - final JDefinedClass rec = cm._package ("org.example")._record ("Person"); - - final JRecordComponent nameComponent = rec.recordComponent (cm.ref (String.class), "name"); - nameComponent.annotate (org.jspecify.annotations.NonNull.class); - - rec.recordComponent (cm.INT, "age"); - - final String output = CodeModelTestsHelper.declare (rec); - assertTrue (output.contains ("@org.jspecify.annotations.NonNull java.lang.String name")); - - CodeModelTestsHelper.parseCodeModel (cm); - } /** * Test: Record with compact constructor (validation) Expected output: diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/AnnotatedPerson.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/AnnotatedPerson.java new file mode 100644 index 00000000..a043b3fc --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/AnnotatedPerson.java @@ -0,0 +1,4 @@ +package com.helger.jcodemodel.tests.basic.record; + +public record AnnotatedPerson(@JRecordTestGen.RecordAnnotationExample String name, int age) { +} diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Pair.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Pair.java new file mode 100644 index 00000000..52aa161d --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Pair.java @@ -0,0 +1,4 @@ +package com.helger.jcodemodel.tests.basic.record; + +public record Pair(T first, U second) { +} diff --git a/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java index 5080f843..7777c0e4 100644 --- a/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java +++ b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java @@ -1,10 +1,17 @@ package com.helger.jcodemodel.tests.basic.record; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + import com.helger.jcodemodel.JCodeModel; import com.helger.jcodemodel.JDefinedClass; import com.helger.jcodemodel.JExpr; import com.helger.jcodemodel.JMethod; import com.helger.jcodemodel.JMod; +import com.helger.jcodemodel.JRecordComponent; +import com.helger.jcodemodel.JTypeVar; import com.helger.jcodemodel.compile.annotation.TestJCM; import com.helger.jcodemodel.exceptions.JCodeModelException; @@ -98,4 +105,56 @@ public JCodeModel genRecordImplementsInterface () throws JCodeModelException return cm; } + /** + * Test: Generic record with type parameters Expected output: + * + *
+   * public record Pair<T, U>(T first, U second) {
+   * }
+   * 
+ * + * @throws JCodeModelException + * In case of error + */ + public JCodeModel genGenericRecord() throws JCodeModelException + { + final JCodeModel cm = new JCodeModel(); + final JDefinedClass rec = cm._package(rootPackage)._record("Pair"); + final JTypeVar t = rec.generify("T"); + final JTypeVar u = rec.generify("U"); + rec.recordComponent(t, "first"); + rec.recordComponent(u, "second"); + return cm; + } + + /** + * Test: Record with annotated component Expected output: + * + *
+   * public record Person(@NonNull String name, int age) {
+   * }
+   * 
+ * + * @throws JCodeModelException + * In case of error + */ + public JCodeModel genRecordWithAnnotatedComponent() throws JCodeModelException + { + final JCodeModel cm = new JCodeModel(); + final JDefinedClass rec = cm._package(rootPackage)._record("AnnotatedPerson"); + final JRecordComponent nameComponent = rec.recordComponent(cm.ref(String.class), "name"); + nameComponent.annotate(RecordAnnotationExample.class); + rec.recordComponent(cm.INT, "age"); + return cm; + } + + /** + * we need a specific record annotation to be kept + */ + @Retention(RetentionPolicy.RUNTIME) + @Target(ElementType.RECORD_COMPONENT) + public @interface RecordAnnotationExample + { + } + } diff --git a/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java b/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java index ff558159..22215ba4 100644 --- a/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java +++ b/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java @@ -40,14 +40,20 @@ */ package com.helger.jcodemodel.tests.record; +import java.lang.reflect.RecordComponent; +import java.util.stream.Stream; + import org.junit.Assert; import org.junit.Test; import com.helger.jcodemodel.exceptions.JCodeModelException; +import com.helger.jcodemodel.tests.basic.record.AnnotatedPerson; import com.helger.jcodemodel.tests.basic.record.BasicPoint; import com.helger.jcodemodel.tests.basic.record.Empty; import com.helger.jcodemodel.tests.basic.record.JRecordTestGen; +import com.helger.jcodemodel.tests.basic.record.JRecordTestGen.RecordAnnotationExample; import com.helger.jcodemodel.tests.basic.record.NamedPoint; +import com.helger.jcodemodel.tests.basic.record.Pair; import com.helger.jcodemodel.tests.basic.record.Person; /** @@ -67,6 +73,8 @@ public void testBasicRecord () throws JCodeModelException { BasicPoint test = new BasicPoint(2, 3); Assert.assertTrue(test instanceof Record); + Assert.assertEquals(2, test.x()); + Assert.assertEquals(3, test.y()); } /** @@ -87,6 +95,8 @@ public void testRecordWithObjectComponents () throws JCodeModelException { Person test = new Person("John", 42); Assert.assertTrue(test instanceof Record); + Assert.assertEquals((Integer) 42, test.age()); + Assert.assertEquals("John", test.name()); } /** @@ -98,5 +108,38 @@ public void testRecordImplementsInterface() throws JCodeModelException NamedPoint test = new NamedPoint(5, 10, "15"); Assert.assertTrue(test instanceof Record); Assert.assertTrue(test instanceof Comparable); + Assert.assertEquals("15", test.name()); + Assert.assertEquals(5, test.x()); + Assert.assertEquals(10, test.y()); + } + + /** + * tests {@link JRecordTestGen#genGenericRecord()} + */ + @Test + public void testGenericRecord() throws JCodeModelException + { + Pair test = new Pair<>(666, "BE NOT AFRAID"); + Assert.assertTrue(test instanceof Record); + Assert.assertEquals((Integer) 666, test.first()); + Assert.assertEquals("BE NOT AFRAID", test.second()); + } + + /** + * tests {@link JRecordTestGen#genRecordWithAnnotatedComponent()} + * + * @throws SecurityException + * @throws NoSuchFieldException + */ + @Test + public void genRecordWithAnnotatedComponent() throws JCodeModelException, NoSuchFieldException, SecurityException + { + AnnotatedPerson test = new AnnotatedPerson("Salomon", 2000); + Assert.assertTrue(test instanceof Record); + + RecordComponent fieldComponent = Stream.of(test.getClass().getRecordComponents()) + .filter(rc -> rc.getName().equals("name")) + .findFirst().get(); + Assert.assertTrue(fieldComponent.isAnnotationPresent(RecordAnnotationExample.class)); } } From 9359c33cfa106f267c2d39b19ab4b32893881907 Mon Sep 17 00:00:00 2001 From: glelouet Date: Wed, 4 Feb 2026 17:57:35 +0100 Subject: [PATCH 06/14] more record tests migration + changed to have same test and gen names --- .../com/helger/jcodemodel/JRecordTest.java | 127 ------------------ .../tests/basic/record/PointDistance.java | 8 ++ .../jcodemodel/tests/basic/record/Range.java | 10 ++ .../tests/basic/record/RangeCanonical.java | 12 ++ .../tests/basic/record/JRecordTestGen.java | 113 +++++++++++++++- .../jcodemodel/tests/record/JRecordTest.java | 56 ++++++-- 6 files changed, 179 insertions(+), 147 deletions(-) create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointDistance.java create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Range.java create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/RangeCanonical.java diff --git a/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java b/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java index e2e65431..5e35654c 100644 --- a/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java +++ b/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java @@ -58,133 +58,6 @@ public final class JRecordTest - - - - - - - - /** - * Test: Record with compact constructor (validation) Expected output: - * - *
-   * public record Range (int lo, int hi)
-   * {
-   *   public Range
-   *   {
-   *     if (lo > hi)
-   *     {
-   *       throw new IllegalArgumentException ();
-   *     }
-   *   }
-   * }
-   * 
- * - * @throws JCodeModelException - * In case of error - */ - @Test - public void testRecordWithCompactConstructor () throws JCodeModelException - { - final JCodeModel cm = new JCodeModel (); - final JDefinedClass rec = cm._package ("org.example")._record ("Range"); - final JRecordComponent rcLo = rec.recordComponent (cm.INT, "lo"); - final JRecordComponent rcHi = rec.recordComponent (cm.INT, "hi"); - - // Compact constructor - no parameter list, just validation logic - final JMethod compactCtor = rec.compactConstructor (JMod.PUBLIC); - compactCtor.body () - ._if (JExpr.ref (rcLo).gt (JExpr.ref (rcHi))) - ._then () - ._throw (cm.ref (IllegalArgumentException.class), JExpr.lit ("High must be greater or equal to Low")); - - final String output = CodeModelTestsHelper.declare (rec); - // Compact constructor has no parentheses after the record name - assertTrue (output.contains ("public Range {")); - - CodeModelTestsHelper.parseCodeModel (cm); - } - - /** - * Test: Record with explicit canonical constructor Expected output: - * - *
-   * public record Range (int lo, int hi)
-   * {
-   *   public Range (int lo, int hi)
-   *   {
-   *     if (lo > hi)
-   *     {
-   *       throw new IllegalArgumentException ();
-   *     }
-   *     this.lo = lo;
-   *     this.hi = hi;
-   *   }
-   * }
-   * 
- * - * @throws JCodeModelException - * In case of error - */ - @Test - public void testRecordWithCanonicalConstructor () throws JCodeModelException - { - final JCodeModel cm = new JCodeModel (); - final JDefinedClass rec = cm._package ("org.example")._record ("Range"); - final JRecordComponent rcLo = rec.recordComponent (cm.INT, "lo"); - final JRecordComponent rcHi = rec.recordComponent (cm.INT, "hi"); - - // Canonical constructor - must have same parameters as record components - final JMethod ctor = rec.constructor (JMod.PUBLIC); - final JVar loParam = ctor.param (cm.INT, "lo"); - final JVar hiParam = ctor.param (cm.INT, "hi"); - ctor.body ()._if (loParam.gt (hiParam))._then ()._throw (JExpr._new (cm.ref (IllegalArgumentException.class))); - // This could be done nicer... - ctor.body ().assign (JExpr.refthis (rcLo), loParam); - ctor.body ().assign (JExpr.refthis (rcHi), hiParam); - - final String output = CodeModelTestsHelper.declare (rec); - // Compact constructor has no parentheses after the record name - assertTrue (output.contains ("this.lo = lo;")); - assertTrue (output.contains ("this.hi = hi;")); - - CodeModelTestsHelper.parseCodeModel (cm); - } - - /** - * Test: Record with additional instance method Expected output: - * - *
-   * public record Point (int x, int y)
-   * {
-   *   public double distance ()
-   *   {
-   *     return Math.sqrt ((x * x) + (y * y));
-   *   }
-   * }
-   * 
- * - * @throws JCodeModelException - * In case of error - */ - @Test - public void testRecordWithMethod () throws JCodeModelException - { - final JCodeModel cm = new JCodeModel (); - final JDefinedClass rec = cm._package ("org.example")._record ("Point"); - final JRecordComponent rcX = rec.recordComponent (cm.INT, "x"); - final JRecordComponent rcY = rec.recordComponent (cm.INT, "y"); - - final JMethod method = rec.method (JMod.PUBLIC, cm.DOUBLE, "distance"); - method.body () - ._return (cm.ref (Math.class) - .staticInvoke ("sqrt") - .arg (JExpr.ref (rcX).mul (JExpr.ref (rcX)).plus (JExpr.ref (rcY).mul (JExpr.ref (rcY))))); - - CodeModelTestsHelper.parseCodeModel (cm); - } - /** * Test: Record with static field and method Expected output: * diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointDistance.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointDistance.java new file mode 100644 index 00000000..b3fab15d --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointDistance.java @@ -0,0 +1,8 @@ +package com.helger.jcodemodel.tests.basic.record; + +public record PointDistance(int x, int y) { + + public double distance() { + return Math.sqrt(((x*x)+(y*y))); + } +} diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Range.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Range.java new file mode 100644 index 00000000..0ba5bd76 --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Range.java @@ -0,0 +1,10 @@ +package com.helger.jcodemodel.tests.basic.record; + +public record Range(int lo, int hi) { + + public Range { + if (lo >hi) { + throw new IllegalArgumentException("High must be greater or equal to Low"); + } + } +} diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/RangeCanonical.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/RangeCanonical.java new file mode 100644 index 00000000..01fb731a --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/RangeCanonical.java @@ -0,0 +1,12 @@ +package com.helger.jcodemodel.tests.basic.record; + +public record RangeCanonical(int lo, int hi) { + + public RangeCanonical(int lo, int hi) { + if (lo >hi) { + throw new IllegalArgumentException("lo must be < hi"); + } + this.lo = lo; + this.hi = hi; + } +} diff --git a/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java index 7777c0e4..afeda548 100644 --- a/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java +++ b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java @@ -12,6 +12,7 @@ import com.helger.jcodemodel.JMod; import com.helger.jcodemodel.JRecordComponent; import com.helger.jcodemodel.JTypeVar; +import com.helger.jcodemodel.JVar; import com.helger.jcodemodel.compile.annotation.TestJCM; import com.helger.jcodemodel.exceptions.JCodeModelException; @@ -33,7 +34,7 @@ public class JRecordTestGen { * @throws JCodeModelException * In case of error */ - public JCodeModel genBasicRecord () throws JCodeModelException + public JCodeModel testBasicRecord() throws JCodeModelException { final JCodeModel cm = new JCodeModel (); final JDefinedClass rec = cm._package (rootPackage)._record ("BasicPoint"); @@ -53,7 +54,7 @@ public JCodeModel genBasicRecord () throws JCodeModelException * @throws JCodeModelException * In case of error */ - public JCodeModel genEmptyRecord () throws JCodeModelException + public JCodeModel testEmptyRecord() throws JCodeModelException { final JCodeModel cm = new JCodeModel (); cm._package(rootPackage)._record("Empty"); @@ -71,7 +72,7 @@ public JCodeModel genEmptyRecord () throws JCodeModelException * @throws JCodeModelException * In case of error */ - public JCodeModel genRecordWithObjectComponents () throws JCodeModelException + public JCodeModel testRecordWithObjectComponents() throws JCodeModelException { final JCodeModel cm = new JCodeModel (); final JDefinedClass rec = cm._package (rootPackage)._record ("Person"); @@ -91,7 +92,7 @@ public JCodeModel genRecordWithObjectComponents () throws JCodeModelException * @throws JCodeModelException * In case of error */ - public JCodeModel genRecordImplementsInterface () throws JCodeModelException + public JCodeModel testRecordImplementsInterface() throws JCodeModelException { final JCodeModel cm = new JCodeModel (); final JDefinedClass rec = cm._package (rootPackage)._record ("NamedPoint"); @@ -116,7 +117,7 @@ public JCodeModel genRecordImplementsInterface () throws JCodeModelException * @throws JCodeModelException * In case of error */ - public JCodeModel genGenericRecord() throws JCodeModelException + public JCodeModel testGenericRecord() throws JCodeModelException { final JCodeModel cm = new JCodeModel(); final JDefinedClass rec = cm._package(rootPackage)._record("Pair"); @@ -138,7 +139,7 @@ public JCodeModel genGenericRecord() throws JCodeModelException * @throws JCodeModelException * In case of error */ - public JCodeModel genRecordWithAnnotatedComponent() throws JCodeModelException + public JCodeModel testRecordWithAnnotatedComponent() throws JCodeModelException { final JCodeModel cm = new JCodeModel(); final JDefinedClass rec = cm._package(rootPackage)._record("AnnotatedPerson"); @@ -157,4 +158,104 @@ public JCodeModel genRecordWithAnnotatedComponent() throws JCodeModelException { } + /** + * Test: Record with compact constructor (validation) Expected output: + * + *
+   * public record Range(int lo, int hi) {
+   * 	public Range {
+   * 		if (lo > hi) {
+   * 			throw new IllegalArgumentException();
+   * 		}
+   * 	}
+   * }
+   * 
+ * + * @throws JCodeModelException + * In case of error + */ + public JCodeModel testRecordWithCompactConstructor() throws JCodeModelException + { + final JCodeModel cm = new JCodeModel(); + final JDefinedClass rec = cm._package(rootPackage)._record("Range"); + final JRecordComponent rcLo = rec.recordComponent(cm.INT, "lo"); + final JRecordComponent rcHi = rec.recordComponent(cm.INT, "hi"); + + // Compact constructor - no parameter list, just validation logic + final JMethod compactCtor = rec.compactConstructor(JMod.PUBLIC); + compactCtor.body() + ._if(JExpr.ref(rcLo).gt(JExpr.ref(rcHi))) + ._then() + ._throw(cm.ref(IllegalArgumentException.class), JExpr.lit("High must be greater or equal to Low")); + return cm; + } + + /** + * Test: Record with explicit canonical constructor Expected output: + * + *
+   * public record Range(int lo, int hi) {
+   * 	public Range(int lo, int hi) {
+   * 		if (lo > hi) {
+   * 			throw new IllegalArgumentException();
+   * 		}
+   * 		this.lo = lo;
+   * 		this.hi = hi;
+   * 	}
+   * }
+   * 
+ * + * @throws JCodeModelException + * In case of error + */ + public JCodeModel testRecordWithCanonicalConstructor() throws JCodeModelException + { + final JCodeModel cm = new JCodeModel(); + final JDefinedClass rec = cm._package(rootPackage)._record("RangeCanonical"); + final JRecordComponent rcLo = rec.recordComponent(cm.INT, "lo"); + final JRecordComponent rcHi = rec.recordComponent(cm.INT, "hi"); + + // Canonical constructor - must have same parameters as record components + final JMethod ctor = rec.constructor(JMod.PUBLIC); + final JVar loParam = ctor.param(cm.INT, "lo"); + final JVar hiParam = ctor.param(cm.INT, "hi"); + ctor.body()._if(loParam.gt(hiParam))._then() + ._throw(cm.ref(IllegalArgumentException.class), + JExpr.lit("lo must be < hi")); + ctor.body().assign(JExpr.refthis(rcLo), loParam); + ctor.body().assign(JExpr.refthis(rcHi), hiParam); + return cm; + } + + /** + * Test: Record with additional instance method Expected output: + * + *
+   * public record Point (int x, int y)
+   * {
+   *   public double distance ()
+   *   {
+   *     return Math.sqrt ((x * x) + (y * y));
+   *   }
+   * }
+   * 
+ * + * @throws JCodeModelException + * In case of error + */ + public JCodeModel testRecordWithMethod () throws JCodeModelException + { + final JCodeModel cm = new JCodeModel (); + final JDefinedClass rec = cm._package(rootPackage)._record("PointDistance"); + final JRecordComponent rcX = rec.recordComponent (cm.INT, "x"); + final JRecordComponent rcY = rec.recordComponent (cm.INT, "y"); + + final JMethod method = rec.method (JMod.PUBLIC, cm.DOUBLE, "distance"); + method.body () + ._return (cm.ref (Math.class) + .staticInvoke ("sqrt") + .arg (JExpr.ref (rcX).mul (JExpr.ref (rcX)).plus (JExpr.ref (rcY).mul (JExpr.ref (rcY))))); + return cm; + } + } diff --git a/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java b/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java index 22215ba4..fb8c5e29 100644 --- a/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java +++ b/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java @@ -47,14 +47,8 @@ import org.junit.Test; import com.helger.jcodemodel.exceptions.JCodeModelException; -import com.helger.jcodemodel.tests.basic.record.AnnotatedPerson; -import com.helger.jcodemodel.tests.basic.record.BasicPoint; -import com.helger.jcodemodel.tests.basic.record.Empty; -import com.helger.jcodemodel.tests.basic.record.JRecordTestGen; +import com.helger.jcodemodel.tests.basic.record.*; import com.helger.jcodemodel.tests.basic.record.JRecordTestGen.RecordAnnotationExample; -import com.helger.jcodemodel.tests.basic.record.NamedPoint; -import com.helger.jcodemodel.tests.basic.record.Pair; -import com.helger.jcodemodel.tests.basic.record.Person; /** * Test class for Java record support. Java records (JEP 395, Java 16+) are a special kind of class @@ -66,7 +60,7 @@ public final class JRecordTest { /** - * tests {@link JRecordTestGen#genBasicRecord()} + * tests {@link JRecordTestGen#testBasicRecord()} */ @Test public void testBasicRecord () throws JCodeModelException @@ -78,7 +72,7 @@ public void testBasicRecord () throws JCodeModelException } /** - * tests {@link JRecordTestGen#genEmptyRecord()} + * tests {@link JRecordTestGen#testEmptyRecord()} */ @Test public void testEmptyRecord() throws JCodeModelException @@ -88,7 +82,7 @@ public void testEmptyRecord() throws JCodeModelException } /** - * tests {@link JRecordTestGen#genRecordWithObjectComponents()} + * tests {@link JRecordTestGen#testRecordWithObjectComponents()} */ @Test public void testRecordWithObjectComponents () throws JCodeModelException @@ -100,7 +94,7 @@ public void testRecordWithObjectComponents () throws JCodeModelException } /** - * tests {@link JRecordTestGen#genRecordImplementsInterface()} + * tests {@link JRecordTestGen#testRecordImplementsInterface()} */ @Test public void testRecordImplementsInterface() throws JCodeModelException @@ -114,7 +108,7 @@ public void testRecordImplementsInterface() throws JCodeModelException } /** - * tests {@link JRecordTestGen#genGenericRecord()} + * tests {@link JRecordTestGen#testGenericRecord()} */ @Test public void testGenericRecord() throws JCodeModelException @@ -126,13 +120,13 @@ public void testGenericRecord() throws JCodeModelException } /** - * tests {@link JRecordTestGen#genRecordWithAnnotatedComponent()} + * tests {@link JRecordTestGen#testRecordWithAnnotatedComponent()} * * @throws SecurityException * @throws NoSuchFieldException */ @Test - public void genRecordWithAnnotatedComponent() throws JCodeModelException, NoSuchFieldException, SecurityException + public void testRecordWithAnnotatedComponent() throws JCodeModelException, NoSuchFieldException, SecurityException { AnnotatedPerson test = new AnnotatedPerson("Salomon", 2000); Assert.assertTrue(test instanceof Record); @@ -142,4 +136,38 @@ public void genRecordWithAnnotatedComponent() throws JCodeModelException, NoSuch .findFirst().get(); Assert.assertTrue(fieldComponent.isAnnotationPresent(RecordAnnotationExample.class)); } + + /** + * tests {@link JRecordTestGen#testRecordWithCompactConstructor()} + */ + @Test + public void testRecordWithCompactConstructor() throws JCodeModelException + { + Range test = new Range(1, 5); + Assert.assertTrue(test instanceof Record); + Assert.assertThrows(IllegalArgumentException.class, () -> new Range(5, 1)); + } + + /** + * tests {@link JRecordTestGen#testRecordWithCanonicalConstructor()} + */ + @Test + public void testRecordWithCanonicalConstructor() throws JCodeModelException + { + RangeCanonical test = new RangeCanonical(1, 5); + Assert.assertTrue(test instanceof Record); + Assert.assertThrows(IllegalArgumentException.class, () -> new RangeCanonical(5, 1)); + } + + /** + * tests {@link JRecordTestGen#testRecordWithMethod()} + */ + @Test + public void testRecordWithMethod () + { + PointDistance test = new PointDistance(0, 0); + Assert.assertTrue(test instanceof Record); + Assert.assertEquals(0, test.distance(), 0.0); + } + } From 6435949279d36120d85785076ea28c6fa7df4a43 Mon Sep 17 00:00:00 2001 From: glelouet Date: Wed, 4 Feb 2026 18:04:48 +0100 Subject: [PATCH 07/14] more records test migration --- .../com/helger/jcodemodel/JRecordTest.java | 69 ------------------- .../jcodemodel/tests/basic/record/Outer.java | 7 ++ .../tests/basic/record/PointStatic.java | 9 +++ .../tests/basic/record/JRecordTestGen.java | 59 ++++++++++++++++ .../jcodemodel/tests/record/JRecordTest.java | 25 +++++++ 5 files changed, 100 insertions(+), 69 deletions(-) create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Outer.java create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointStatic.java diff --git a/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java b/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java index 5e35654c..9db754f7 100644 --- a/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java +++ b/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java @@ -58,75 +58,6 @@ public final class JRecordTest - /** - * Test: Record with static field and method Expected output: - * - *
-   * public record Point (int x, int y)
-   * {
-   *   public static final Point ORIGIN = new Point (0, 0);
-   *
-   *   public static Point of (int x, int y)
-   *   {
-   *     return new Point (x, y);
-   *   }
-   * }
-   * 
- * - * @throws JCodeModelException - * In case of error - */ - @Test - public void testRecordWithStaticMembers () throws JCodeModelException - { - final JCodeModel cm = new JCodeModel (); - final JDefinedClass rec = cm._package ("org.example")._record ("Point"); - rec.recordComponent (cm.INT, "x"); - rec.recordComponent (cm.INT, "y"); - - // Static field - rec.field (JMod.PUBLIC | JMod.STATIC | JMod.FINAL, - rec, - "ORIGIN", - JExpr._new (rec).arg (JExpr.lit (0)).arg (JExpr.lit (0))); - - // Static factory method - final JMethod factory = rec.method (JMod.PUBLIC | JMod.STATIC, rec, "of"); - final JVar xParam = factory.param (cm.INT, "x"); - final JVar yParam = factory.param (cm.INT, "y"); - factory.body ()._return (JExpr._new (rec).arg (xParam).arg (yParam)); - - CodeModelTestsHelper.parseCodeModel (cm); - } - - /** - * Test: Nested record inside a class Expected output: - * - *
-   * public class Outer
-   * {
-   *   public record Inner (String value)
-   *   {}
-   * }
-   * 
- * - * @throws JCodeModelException - * In case of error - */ - @Test - public void testNestedRecord () throws JCodeModelException - { - final JCodeModel cm = new JCodeModel (); - final JDefinedClass outer = cm._package ("org.example")._class ("Outer"); - final JDefinedClass inner = outer._record (JMod.PUBLIC, "Inner"); - inner.recordComponent (cm.ref (String.class), "value"); - - final String output = CodeModelTestsHelper.declare (outer); - assertTrue (output.contains ("record Inner(java.lang.String value)")); - - CodeModelTestsHelper.parseCodeModel (cm); - } - /** * Test: Record with javadoc Expected output: * diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Outer.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Outer.java new file mode 100644 index 00000000..9f60f5d3 --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Outer.java @@ -0,0 +1,7 @@ +package com.helger.jcodemodel.tests.basic.record; + +public class Outer { + + public record Inner(String value) { + } +} diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointStatic.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointStatic.java new file mode 100644 index 00000000..982272fb --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointStatic.java @@ -0,0 +1,9 @@ +package com.helger.jcodemodel.tests.basic.record; + +public record PointStatic(int x, int y) { + public static final PointStatic ORIGIN = new PointStatic(0, 0); + + public static PointStatic of(int x, int y) { + return new PointStatic(x, y); + } +} diff --git a/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java index afeda548..2233cb41 100644 --- a/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java +++ b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java @@ -258,4 +258,63 @@ public JCodeModel testRecordWithMethod () throws JCodeModelException return cm; } + /** + * Test: Record with static field and method Expected output: + * + *
+   * public record Point(int x, int y) {
+   * 	public static final Point ORIGIN = new Point(0, 0);
+   *
+   * 	public static Point of(int x, int y) {
+   * 		return new Point(x, y);
+   * 	}
+   * }
+   * 
+ * + * @throws JCodeModelException + * In case of error + */ + public JCodeModel testRecordWithStaticMembers() throws JCodeModelException + { + final JCodeModel cm = new JCodeModel(); + final JDefinedClass rec = cm._package(rootPackage)._record("PointStatic"); + rec.recordComponent(cm.INT, "x"); + rec.recordComponent(cm.INT, "y"); + + // Static field + rec.field(JMod.PUBLIC | JMod.STATIC | JMod.FINAL, + rec, + "ORIGIN", + JExpr._new(rec).arg(JExpr.lit(0)).arg(JExpr.lit(0))); + + // Static factory method + final JMethod factory = rec.method(JMod.PUBLIC | JMod.STATIC, rec, "of"); + final JVar xParam = factory.param(cm.INT, "x"); + final JVar yParam = factory.param(cm.INT, "y"); + factory.body()._return(JExpr._new(rec).arg(xParam).arg(yParam)); + return cm; + } + + /** + * Test: Nested record inside a class Expected output: + * + *
+   * public class Outer {
+   * 	public record Inner(String value) {
+   * 	}
+   * }
+   * 
+ * + * @throws JCodeModelException + * In case of error + */ + public JCodeModel testNestedRecord() throws JCodeModelException + { + final JCodeModel cm = new JCodeModel(); + final JDefinedClass outer = cm._package(rootPackage)._class("Outer"); + final JDefinedClass inner = outer._record(JMod.PUBLIC, "Inner"); + inner.recordComponent(cm.ref(String.class), "value"); + return cm; + } + } diff --git a/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java b/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java index fb8c5e29..cb1bcef9 100644 --- a/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java +++ b/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java @@ -49,6 +49,7 @@ import com.helger.jcodemodel.exceptions.JCodeModelException; import com.helger.jcodemodel.tests.basic.record.*; import com.helger.jcodemodel.tests.basic.record.JRecordTestGen.RecordAnnotationExample; +import com.helger.jcodemodel.tests.basic.record.Outer.Inner; /** * Test class for Java record support. Java records (JEP 395, Java 16+) are a special kind of class @@ -170,4 +171,28 @@ public void testRecordWithMethod () Assert.assertEquals(0, test.distance(), 0.0); } + /** + * tests {@link JRecordTestGen#testRecordWithStaticMembers()} + */ + @Test + public void testRecordWithStaticMembers() throws JCodeModelException + { + PointStatic test = PointStatic.ORIGIN; + Assert.assertTrue(test instanceof Record); + test = PointStatic.of(6, 78); + Assert.assertEquals(6, test.x()); + Assert.assertEquals(78, test.y()); + } + + /** + * tests {@link JRecordTestGen#testNestedRecord()} + */ + @Test + public void testNestedRecord() throws JCodeModelException + { + Inner test = new Inner("NaN"); + Assert.assertTrue(test instanceof Record); + Assert.assertEquals("NaN", test.value()); + } + } From a0afb9ddd4a77fa22d01bea41bd21e2abd1b66ec Mon Sep 17 00:00:00 2001 From: glelouet Date: Wed, 4 Feb 2026 19:29:12 +0100 Subject: [PATCH 08/14] completed record test migration. Keep tests that don't rely on output --- .../com/helger/jcodemodel/JRecordTest.java | 120 ------------------ .../tests/basic/record/ArrayRecord.java | 4 + .../tests/basic/record/PairNumber.java | 4 + .../tests/basic/record/PointJavadoc.java | 13 ++ .../tests/basic/record/SeriesVarArgs.java | 4 + .../tests/basic/record/JRecordTestGen.java | 92 +++++++++++++- .../jcodemodel/tests/record/JRecordTest.java | 65 ++++++++-- 7 files changed, 170 insertions(+), 132 deletions(-) create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/ArrayRecord.java create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PairNumber.java create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointJavadoc.java create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/SeriesVarArgs.java diff --git a/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java b/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java index 9db754f7..1908d69c 100644 --- a/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java +++ b/jcodemodel/src/test/java/com/helger/jcodemodel/JRecordTest.java @@ -40,12 +40,9 @@ */ package com.helger.jcodemodel; -import static org.junit.Assert.assertTrue; - import org.junit.Test; import com.helger.jcodemodel.exceptions.JCodeModelException; -import com.helger.jcodemodel.util.CodeModelTestsHelper; /** * Test class for Java record support. Java records (JEP 395, Java 16+) are a special kind of class @@ -56,123 +53,6 @@ public final class JRecordTest { - - - /** - * Test: Record with javadoc Expected output: - * - *
-   * /**
-   *  * Represents a 2D point.
-   *  *
-   *  * @param x the x coordinate
-   *  * @param y the y coordinate
-   *  *\/
-   * public record Point(int x, int y) {
-   * }
-   * 
- * - * @throws JCodeModelException - * In case of error - */ - @Test - public void testRecordWithJavadoc () throws JCodeModelException - { - final JCodeModel cm = new JCodeModel (); - final JDefinedClass rec = cm._package ("org.example")._record ("Point"); - - final JRecordComponent rcX = rec.recordComponent (cm.INT, "x"); - final JRecordComponent rcY = rec.recordComponent (cm.INT, "y"); - - rec.javadoc ().add ("Represents a 2D point."); - rec.javadoc ().addParam (rcX).add ("the x coordinate"); - rec.javadoc ().addParam (rcY).add ("the y coordinate"); - - final String output = CodeModelTestsHelper.declare (rec); - assertTrue (output.contains ("@param x\n * the x coordinate")); - assertTrue (output.contains ("@param y\n * the y coordinate")); - - CodeModelTestsHelper.parseCodeModel (cm); - } - - /** - * Test: Record with varargs component (last component can be varargs) Expected output: - * - *
-   * public record VarArgsRecord (String name, int... values)
-   * {}
-   * 
- * - * @throws JCodeModelException - * In case of error - */ - @Test - public void testRecordWithVarargsComponent () throws JCodeModelException - { - final JCodeModel cm = new JCodeModel (); - final JDefinedClass rec = cm._package ("org.example")._record ("VarArgsRecord"); - rec.recordComponent (cm.ref (String.class), "name"); - rec.recordComponentVararg (cm.INT, "values"); - - final String output = CodeModelTestsHelper.declare (rec); - assertTrue (output.contains ("int... values")); - - CodeModelTestsHelper.parseCodeModel (cm); - } - - /** - * Test: Record with array component Expected output: - * - *
-   * public record ArrayRecord (String [] names, int [] [] matrix)
-   * {}
-   * 
- * - * @throws JCodeModelException - * In case of error - */ - @Test - public void testRecordWithArrayComponent () throws JCodeModelException - { - final JCodeModel cm = new JCodeModel (); - final JDefinedClass rec = cm._package ("org.example")._record ("ArrayRecord"); - rec.recordComponent (cm.ref (String.class).array (), "names"); - rec.recordComponent (cm.INT.array ().array (), "matrix"); - - final String output = CodeModelTestsHelper.declare (rec); - assertTrue (output.contains ("String[] names")); - assertTrue (output.contains ("int[][] matrix")); - - CodeModelTestsHelper.parseCodeModel (cm); - } - - /** - * Test: Record with bounded generic type parameter Expected output: - * - *
-   * public record NumberPair <T extends Number> (T first, T second)
-   * {}
-   * 
- * - * @throws JCodeModelException - * In case of error - */ - @Test - public void testRecordWithBoundedTypeParameter () throws JCodeModelException - { - final JCodeModel cm = new JCodeModel (); - final JDefinedClass rec = cm._package ("org.example")._record ("NumberPair"); - final JTypeVar t = rec.generify ("T", Number.class); - rec.recordComponent (t, "first"); - rec.recordComponent (t, "second"); - - final String output = CodeModelTestsHelper.declare (rec); - assertTrue (output.contains ("")); - assertTrue (output.contains ("(T first, T second)")); - - CodeModelTestsHelper.parseCodeModel (cm); - } - @Test (expected = IllegalStateException.class) public void testCantAddRecordComponentsToNonRecordClass () throws JCodeModelException { diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/ArrayRecord.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/ArrayRecord.java new file mode 100644 index 00000000..ff9f944e --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/ArrayRecord.java @@ -0,0 +1,4 @@ +package com.helger.jcodemodel.tests.basic.record; + +public record ArrayRecord(String[] names, int[][] matrix) { +} diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PairNumber.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PairNumber.java new file mode 100644 index 00000000..1cf53784 --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PairNumber.java @@ -0,0 +1,4 @@ +package com.helger.jcodemodel.tests.basic.record; + +public record PairNumber(T first, T second) { +} diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointJavadoc.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointJavadoc.java new file mode 100644 index 00000000..c6b4996a --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointJavadoc.java @@ -0,0 +1,13 @@ +package com.helger.jcodemodel.tests.basic.record; + + +/** + * Represents a 2D point. + * + * @param x + * the x coordinate + * @param y + * the y coordinate + */ +public record PointJavadoc(int x, int y) { +} diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/SeriesVarArgs.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/SeriesVarArgs.java new file mode 100644 index 00000000..29ff7a4a --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/SeriesVarArgs.java @@ -0,0 +1,4 @@ +package com.helger.jcodemodel.tests.basic.record; + +public record SeriesVarArgs(String name, int... values) { +} diff --git a/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java index 2233cb41..ac1c9f75 100644 --- a/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java +++ b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java @@ -128,6 +128,27 @@ public JCodeModel testGenericRecord() throws JCodeModelException return cm; } + /** + * Test: Record with bounded generic type parameter Expected output: + * + *
+   * public record NumberPair<T extends Number>(T first, T second) {
+   * }
+   * 
+ * + * @throws JCodeModelException + * In case of error + */ + public JCodeModel testRecordWithBoundedTypeParameter() throws JCodeModelException + { + final JCodeModel cm = new JCodeModel(); + final JDefinedClass rec = cm._package(rootPackage)._record("PairNumber"); + final JTypeVar t = rec.generify("T", Number.class); + rec.recordComponent(t, "first"); + rec.recordComponent(t, "second"); + return cm; + } + /** * Test: Record with annotated component Expected output: * @@ -308,7 +329,7 @@ public JCodeModel testRecordWithStaticMembers() throws JCodeModelException * @throws JCodeModelException * In case of error */ - public JCodeModel testNestedRecord() throws JCodeModelException + public JCodeModel testNestedRecord() throws JCodeModelException { final JCodeModel cm = new JCodeModel(); final JDefinedClass outer = cm._package(rootPackage)._class("Outer"); @@ -317,4 +338,73 @@ public JCodeModel testNestedRecord() throws JCodeModelException return cm; } + /** + * Test: Record with javadoc Expected output: + * + *
+   * /**
+   *  * Represents a 2D point.
+   *  *
+   *  * @param x the x coordinate
+   *  * @param y the y coordinate
+   *  *\/
+   * public record Point(int x, int y) {
+   * }
+   * 
+ * + * @throws JCodeModelException + * In case of error + */ + public JCodeModel testRecordWithJavadoc() throws JCodeModelException + { + final JCodeModel cm = new JCodeModel(); + final JDefinedClass rec = cm._package(rootPackage)._record("PointJavadoc"); + final JRecordComponent rcX = rec.recordComponent(cm.INT, "x"); + final JRecordComponent rcY = rec.recordComponent(cm.INT, "y"); + rec.javadoc().add("Represents a 2D point."); + rec.javadoc().addParam(rcX).add("the x coordinate"); + rec.javadoc().addParam(rcY).add("the y coordinate"); + return cm; + } + + /** + * Test: Record with varargs component (last component can be varargs) Expected + * output: + * + *
+   * public record VarArgsRecord(String name, int... values) {
+   * }
+   * 
+ * + * @throws JCodeModelException + * In case of error + */ + public JCodeModel testRecordWithVarargsComponent() throws JCodeModelException + { + final JCodeModel cm = new JCodeModel(); + final JDefinedClass rec = cm._package(rootPackage)._record("SeriesVarArgs"); + rec.recordComponent(cm.ref(String.class), "name"); + rec.recordComponentVararg(cm.INT, "values"); + return cm; + } + + /** + * Test: Record with array component Expected output: + * + *
+   * public record ArrayRecord(String[] names, int[][] matrix) {
+   * }
+   * 
+ * + * @throws JCodeModelException + * In case of error + */ + public JCodeModel testRecordWithArrayComponent() throws JCodeModelException { + final JCodeModel cm = new JCodeModel(); + final JDefinedClass rec = cm._package(rootPackage)._record("ArrayRecord"); + rec.recordComponent(cm.ref(String.class).array(), "names"); + rec.recordComponent(cm.INT.array().array(), "matrix"); + return cm; + } + } diff --git a/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java b/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java index cb1bcef9..939e1349 100644 --- a/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java +++ b/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java @@ -41,12 +41,12 @@ package com.helger.jcodemodel.tests.record; import java.lang.reflect.RecordComponent; +import java.math.BigDecimal; import java.util.stream.Stream; import org.junit.Assert; import org.junit.Test; -import com.helger.jcodemodel.exceptions.JCodeModelException; import com.helger.jcodemodel.tests.basic.record.*; import com.helger.jcodemodel.tests.basic.record.JRecordTestGen.RecordAnnotationExample; import com.helger.jcodemodel.tests.basic.record.Outer.Inner; @@ -64,7 +64,7 @@ public final class JRecordTest * tests {@link JRecordTestGen#testBasicRecord()} */ @Test - public void testBasicRecord () throws JCodeModelException + public void testBasicRecord() { BasicPoint test = new BasicPoint(2, 3); Assert.assertTrue(test instanceof Record); @@ -76,7 +76,7 @@ public void testBasicRecord () throws JCodeModelException * tests {@link JRecordTestGen#testEmptyRecord()} */ @Test - public void testEmptyRecord() throws JCodeModelException + public void testEmptyRecord() { Empty test = new Empty(); Assert.assertTrue(test instanceof Record); @@ -86,7 +86,7 @@ public void testEmptyRecord() throws JCodeModelException * tests {@link JRecordTestGen#testRecordWithObjectComponents()} */ @Test - public void testRecordWithObjectComponents () throws JCodeModelException + public void testRecordWithObjectComponents() { Person test = new Person("John", 42); Assert.assertTrue(test instanceof Record); @@ -98,7 +98,7 @@ public void testRecordWithObjectComponents () throws JCodeModelException * tests {@link JRecordTestGen#testRecordImplementsInterface()} */ @Test - public void testRecordImplementsInterface() throws JCodeModelException + public void testRecordImplementsInterface() { NamedPoint test = new NamedPoint(5, 10, "15"); Assert.assertTrue(test instanceof Record); @@ -112,7 +112,7 @@ public void testRecordImplementsInterface() throws JCodeModelException * tests {@link JRecordTestGen#testGenericRecord()} */ @Test - public void testGenericRecord() throws JCodeModelException + public void testGenericRecord() { Pair test = new Pair<>(666, "BE NOT AFRAID"); Assert.assertTrue(test instanceof Record); @@ -120,6 +120,16 @@ public void testGenericRecord() throws JCodeModelException Assert.assertEquals("BE NOT AFRAID", test.second()); } + /** + * tests {@link JRecordTestGen#testRecordWithBoundedTypeParameter()} + */ + @Test + public void testRecordWithBoundedTypeParameter() + { + PairNumber test = new PairNumber<>(BigDecimal.ONE, BigDecimal.ZERO); + Assert.assertTrue(test instanceof Record); + } + /** * tests {@link JRecordTestGen#testRecordWithAnnotatedComponent()} * @@ -127,7 +137,7 @@ public void testGenericRecord() throws JCodeModelException * @throws NoSuchFieldException */ @Test - public void testRecordWithAnnotatedComponent() throws JCodeModelException, NoSuchFieldException, SecurityException + public void testRecordWithAnnotatedComponent() { AnnotatedPerson test = new AnnotatedPerson("Salomon", 2000); Assert.assertTrue(test instanceof Record); @@ -142,7 +152,7 @@ public void testRecordWithAnnotatedComponent() throws JCodeModelException, NoSuc * tests {@link JRecordTestGen#testRecordWithCompactConstructor()} */ @Test - public void testRecordWithCompactConstructor() throws JCodeModelException + public void testRecordWithCompactConstructor() { Range test = new Range(1, 5); Assert.assertTrue(test instanceof Record); @@ -153,7 +163,7 @@ public void testRecordWithCompactConstructor() throws JCodeModelException * tests {@link JRecordTestGen#testRecordWithCanonicalConstructor()} */ @Test - public void testRecordWithCanonicalConstructor() throws JCodeModelException + public void testRecordWithCanonicalConstructor() { RangeCanonical test = new RangeCanonical(1, 5); Assert.assertTrue(test instanceof Record); @@ -175,7 +185,7 @@ public void testRecordWithMethod () * tests {@link JRecordTestGen#testRecordWithStaticMembers()} */ @Test - public void testRecordWithStaticMembers() throws JCodeModelException + public void testRecordWithStaticMembers() { PointStatic test = PointStatic.ORIGIN; Assert.assertTrue(test instanceof Record); @@ -188,11 +198,44 @@ public void testRecordWithStaticMembers() throws JCodeModelException * tests {@link JRecordTestGen#testNestedRecord()} */ @Test - public void testNestedRecord() throws JCodeModelException + public void testNestedRecord() { Inner test = new Inner("NaN"); Assert.assertTrue(test instanceof Record); Assert.assertEquals("NaN", test.value()); } + /** + * tests {@link JRecordTestGen#testRecordWithJavadoc()} + */ + @Test + public void testRecordWithJavadoc() { + // nothing to do to test javadoc ?? + PointJavadoc test = new PointJavadoc(0, 0); + Assert.assertTrue(test instanceof Record); + } + + /** + * tests {@link JRecordTestGen#testRecordWithVarargsComponent()} + */ + @Test + public void testRecordWithVarargsComponent() + { + SeriesVarArgs test = new SeriesVarArgs("Fibonacci", 1,1,3,4); + Assert.assertTrue(test instanceof Record); + Assert.assertArrayEquals(test.values(), new int[] { 1, 1, 3, 4 }); + } + + /** + * tests {@link JRecordTestGen#testRecordWithArrayComponent()} + */ + @Test + public void testRecordWithArrayComponent() { + ArrayRecord test = new ArrayRecord(new String[] { "id" }, new int[][] { { 1, 2 } }); + Assert.assertTrue(test instanceof Record); + Assert.assertArrayEquals(test.names(), new String[] { "id" }); + Assert.assertArrayEquals(test.matrix()[0], new int[] { 1, 2 }); + + } + } From 43f68271020c63c70196762762e793b11ff4ab53 Mon Sep 17 00:00:00 2001 From: glelouet Date: Wed, 4 Feb 2026 19:49:13 +0100 Subject: [PATCH 09/14] removed syserr debug --- .../helger/jcodemodel/plugin/generators/json/JsonGenerator.java | 1 - 1 file changed, 1 deletion(-) diff --git a/plugin/generators/json/src/main/java/com/helger/jcodemodel/plugin/generators/json/JsonGenerator.java b/plugin/generators/json/src/main/java/com/helger/jcodemodel/plugin/generators/json/JsonGenerator.java index cc5e8e0c..2763fa00 100644 --- a/plugin/generators/json/src/main/java/com/helger/jcodemodel/plugin/generators/json/JsonGenerator.java +++ b/plugin/generators/json/src/main/java/com/helger/jcodemodel/plugin/generators/json/JsonGenerator.java @@ -56,7 +56,6 @@ protected JsonPackage load (InputStream source) throws IOException protected Stream visitPackage (JsonPackage pck, String path) { - System.err.println ("visit package " + path); Stream ret = Stream.empty (); if (pck.isClassInfo ()) { From f35e0b3729bad5e828c350cb89f748782217e969 Mon Sep 17 00:00:00 2001 From: glelouet Date: Wed, 4 Feb 2026 20:04:02 +0100 Subject: [PATCH 10/14] refactor test package (record is not basic) --- .../examples/plugin/csv/basic/EmptyClass.java | 16 ++++++++-------- .../examples/plugin/csv/basic/SimpleFields.java | 16 ++++++++-------- .../examples/plugin/csv/deeparray/Example2.java | 16 ++++++++-------- .../examples/plugin/csv/getset/Example3.java | 16 ++++++++-------- .../examples/plugin/csv/immutable/Animal.java | 16 ++++++++-------- .../examples/plugin/csv/immutable/Dog.java | 16 ++++++++-------- .../plugin/csv/immutable/WeirdReference.java | 16 ++++++++-------- .../examples/plugin/csv/inherit/City.java | 16 ++++++++-------- .../examples/plugin/csv/inherit/Dated.java | 16 ++++++++-------- .../examples/plugin/csv/inherit/Point.java | 16 ++++++++-------- .../plugin/csv/lastupdated/LastUpdated.java | 16 ++++++++-------- .../examples/plugin/csv/redirect/ABC.java | 16 ++++++++-------- .../plugin/csv/redirect/ClassRedirect.java | 16 ++++++++-------- .../examples/plugin/csv/redirect/Redirected.java | 16 ++++++++-------- .../examples/plugin/csv/resolve/Child.java | 16 ++++++++-------- .../examples/plugin/csv/resolve/Imported.java | 16 ++++++++-------- .../examples/plugin/csv/resolve/Parent.java | 16 ++++++++-------- .../java/com/helger/tests/helloworld/Hello.java | 16 ++++++++-------- .../com/helger/tests/helloworld/Hello2.java | 16 ++++++++-------- .../jcodemodel/examples/plugin/json/basic/A.java | 16 ++++++++-------- .../jcodemodel/examples/plugin/json/basic/B.java | 16 ++++++++-------- .../jcodemodel/examples/plugin/json/basic/C.java | 16 ++++++++-------- .../jcodemodel/examples/plugin/yaml/basic/A.java | 16 ++++++++-------- .../jcodemodel/examples/plugin/yaml/basic/B.java | 16 ++++++++-------- .../jcodemodel/examples/plugin/yaml/basic/C.java | 16 ++++++++-------- .../examples/plugin/yaml/basic/Empty1.java | 16 ++++++++-------- .../examples/plugin/yaml/basic/Empty2.java | 16 ++++++++-------- .../examples/plugin/yaml/basic/ListSon.java | 16 ++++++++-------- .../plugin/yaml/concrete/ConcreteList.java | 16 ++++++++-------- .../plugin/yaml/concrete/ConcreteMap.java | 16 ++++++++-------- .../plugin/yaml/concrete/ConcreteSet.java | 16 ++++++++-------- .../tests/basic/record/BasicPoint.java | 4 ---- .../jcodemodel/tests/basic/record/Empty.java | 4 ---- .../jcodemodel/tests/basic/record/Pair.java | 4 ---- .../{basic => }/record/AnnotatedPerson.java | 2 +- .../tests/{basic => }/record/ArrayRecord.java | 2 +- .../jcodemodel/tests/record/BasicPoint.java | 4 ++++ .../helger/jcodemodel/tests/record/Empty.java | 4 ++++ .../tests/{basic => }/record/NamedPoint.java | 2 +- .../tests/{basic => }/record/Outer.java | 2 +- .../com/helger/jcodemodel/tests/record/Pair.java | 4 ++++ .../tests/{basic => }/record/PairNumber.java | 2 +- .../tests/{basic => }/record/Person.java | 2 +- .../tests/{basic => }/record/PointDistance.java | 2 +- .../tests/{basic => }/record/PointJavadoc.java | 2 +- .../tests/{basic => }/record/PointStatic.java | 2 +- .../tests/{basic => }/record/Range.java | 2 +- .../tests/{basic => }/record/RangeCanonical.java | 2 +- .../tests/{basic => }/record/SeriesVarArgs.java | 2 +- .../tests/{basic => }/record/JRecordTestGen.java | 2 +- .../jcodemodel/tests/record/JRecordTest.java | 6 +++--- 51 files changed, 276 insertions(+), 276 deletions(-) delete mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/BasicPoint.java delete mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Empty.java delete mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Pair.java rename jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/{basic => }/record/AnnotatedPerson.java (65%) rename jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/{basic => }/record/ArrayRecord.java (55%) create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/BasicPoint.java create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/Empty.java rename jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/{basic => }/record/NamedPoint.java (76%) rename jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/{basic => }/record/Outer.java (58%) create mode 100644 jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/Pair.java rename jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/{basic => }/record/PairNumber.java (57%) rename jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/{basic => }/record/Person.java (50%) rename jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/{basic => }/record/PointDistance.java (71%) rename jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/{basic => }/record/PointJavadoc.java (75%) rename jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/{basic => }/record/PointStatic.java (80%) rename jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/{basic => }/record/Range.java (78%) rename jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/{basic => }/record/RangeCanonical.java (82%) rename jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/{basic => }/record/SeriesVarArgs.java (54%) rename jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/{basic => }/record/JRecordTestGen.java (99%) diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/basic/EmptyClass.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/basic/EmptyClass.java index ec35bd97..c8f3355d 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/basic/EmptyClass.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/basic/EmptyClass.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.basic; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/basic/SimpleFields.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/basic/SimpleFields.java index 9fd555cb..6d83b60e 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/basic/SimpleFields.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/basic/SimpleFields.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.basic; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/deeparray/Example2.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/deeparray/Example2.java index 227f56ed..40ee2b8d 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/deeparray/Example2.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/deeparray/Example2.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.deeparray; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/getset/Example3.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/getset/Example3.java index 86a33e33..8389feb4 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/getset/Example3.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/getset/Example3.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.getset; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/Animal.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/Animal.java index 20f3b9e1..eba3ef14 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/Animal.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/Animal.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.immutable; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/Dog.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/Dog.java index 88642331..e42882a1 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/Dog.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/Dog.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.immutable; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/WeirdReference.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/WeirdReference.java index 0cf5da41..e48d7cf9 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/WeirdReference.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/WeirdReference.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.immutable; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/City.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/City.java index fdd3ee01..cf6cc5aa 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/City.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/City.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.inherit; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/Dated.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/Dated.java index 022ba76a..3e366864 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/Dated.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/Dated.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.inherit; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/Point.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/Point.java index ea3fb1a2..55bafae9 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/Point.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/Point.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.inherit; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/lastupdated/LastUpdated.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/lastupdated/LastUpdated.java index 7eaa77de..7f868e8d 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/lastupdated/LastUpdated.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/lastupdated/LastUpdated.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.lastupdated; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/ABC.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/ABC.java index 50f9b011..58acdb0b 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/ABC.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/ABC.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.redirect; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/ClassRedirect.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/ClassRedirect.java index b3514eee..89b9d215 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/ClassRedirect.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/ClassRedirect.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.redirect; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/Redirected.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/Redirected.java index 18e2573c..cd5dca85 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/Redirected.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/Redirected.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.redirect; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Child.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Child.java index d7985376..ef448e89 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Child.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Child.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.resolve; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Imported.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Imported.java index c4682ba2..e9ab0abb 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Imported.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Imported.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.resolve; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Parent.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Parent.java index 48beef03..322bea20 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Parent.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Parent.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.resolve; diff --git a/examples/plugins/helloworld/src/generated/java/com/helger/tests/helloworld/Hello.java b/examples/plugins/helloworld/src/generated/java/com/helger/tests/helloworld/Hello.java index 219f37b2..fd77c035 100644 --- a/examples/plugins/helloworld/src/generated/java/com/helger/tests/helloworld/Hello.java +++ b/examples/plugins/helloworld/src/generated/java/com/helger/tests/helloworld/Hello.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.tests.helloworld; diff --git a/examples/plugins/helloworld/src/generated/java2/com/helger/tests/helloworld/Hello2.java b/examples/plugins/helloworld/src/generated/java2/com/helger/tests/helloworld/Hello2.java index 732455c0..d1047a19 100644 --- a/examples/plugins/helloworld/src/generated/java2/com/helger/tests/helloworld/Hello2.java +++ b/examples/plugins/helloworld/src/generated/java2/com/helger/tests/helloworld/Hello2.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.tests.helloworld; diff --git a/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/A.java b/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/A.java index a084c6b7..609f1007 100644 --- a/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/A.java +++ b/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/A.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.json.basic; diff --git a/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/B.java b/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/B.java index 615482f7..d7c8da31 100644 --- a/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/B.java +++ b/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/B.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.json.basic; diff --git a/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/C.java b/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/C.java index c2b14441..8d388ba5 100644 --- a/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/C.java +++ b/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/C.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.json.basic; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/A.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/A.java index 01396190..5e345ab6 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/A.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/A.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.basic; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/B.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/B.java index a7a84644..12591ad9 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/B.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/B.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.basic; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/C.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/C.java index f73761f0..c323bef7 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/C.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/C.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.basic; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/Empty1.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/Empty1.java index 3e9c6c05..60f58bf9 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/Empty1.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/Empty1.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.basic; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/Empty2.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/Empty2.java index eb18b9b5..56a960b8 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/Empty2.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/Empty2.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.basic; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/ListSon.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/ListSon.java index 3b4858eb..e474878e 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/ListSon.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/ListSon.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.basic; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteList.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteList.java index 01526149..f05e3a15 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteList.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteList.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.concrete; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteMap.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteMap.java index c2b6b702..90f14cc9 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteMap.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteMap.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.concrete; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteSet.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteSet.java index 1aff7324..2aec2c7c 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteSet.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteSet.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.concrete; diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/BasicPoint.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/BasicPoint.java deleted file mode 100644 index f7ad339e..00000000 --- a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/BasicPoint.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.helger.jcodemodel.tests.basic.record; - -public record BasicPoint(int x, int y) { -} diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Empty.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Empty.java deleted file mode 100644 index 0363a03b..00000000 --- a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Empty.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.helger.jcodemodel.tests.basic.record; - -public record Empty() { -} diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Pair.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Pair.java deleted file mode 100644 index 52aa161d..00000000 --- a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Pair.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.helger.jcodemodel.tests.basic.record; - -public record Pair(T first, U second) { -} diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/AnnotatedPerson.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/AnnotatedPerson.java similarity index 65% rename from jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/AnnotatedPerson.java rename to jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/AnnotatedPerson.java index a043b3fc..f51a4744 100644 --- a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/AnnotatedPerson.java +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/AnnotatedPerson.java @@ -1,4 +1,4 @@ -package com.helger.jcodemodel.tests.basic.record; +package com.helger.jcodemodel.tests.record; public record AnnotatedPerson(@JRecordTestGen.RecordAnnotationExample String name, int age) { } diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/ArrayRecord.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/ArrayRecord.java similarity index 55% rename from jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/ArrayRecord.java rename to jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/ArrayRecord.java index ff9f944e..7fc65df4 100644 --- a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/ArrayRecord.java +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/ArrayRecord.java @@ -1,4 +1,4 @@ -package com.helger.jcodemodel.tests.basic.record; +package com.helger.jcodemodel.tests.record; public record ArrayRecord(String[] names, int[][] matrix) { } diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/BasicPoint.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/BasicPoint.java new file mode 100644 index 00000000..8140ebd2 --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/BasicPoint.java @@ -0,0 +1,4 @@ +package com.helger.jcodemodel.tests.record; + +public record BasicPoint(int x, int y) { +} diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/Empty.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/Empty.java new file mode 100644 index 00000000..a5c9fe0c --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/Empty.java @@ -0,0 +1,4 @@ +package com.helger.jcodemodel.tests.record; + +public record Empty() { +} diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/NamedPoint.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/NamedPoint.java similarity index 76% rename from jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/NamedPoint.java rename to jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/NamedPoint.java index 4445c4be..ebfce1ee 100644 --- a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/NamedPoint.java +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/NamedPoint.java @@ -1,4 +1,4 @@ -package com.helger.jcodemodel.tests.basic.record; +package com.helger.jcodemodel.tests.record; public record NamedPoint(int x, int y, String name) implements Comparable diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Outer.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/Outer.java similarity index 58% rename from jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Outer.java rename to jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/Outer.java index 9f60f5d3..cc611f2c 100644 --- a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Outer.java +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/Outer.java @@ -1,4 +1,4 @@ -package com.helger.jcodemodel.tests.basic.record; +package com.helger.jcodemodel.tests.record; public class Outer { diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/Pair.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/Pair.java new file mode 100644 index 00000000..bce9ef75 --- /dev/null +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/Pair.java @@ -0,0 +1,4 @@ +package com.helger.jcodemodel.tests.record; + +public record Pair(T first, U second) { +} diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PairNumber.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/PairNumber.java similarity index 57% rename from jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PairNumber.java rename to jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/PairNumber.java index 1cf53784..d6a4e52f 100644 --- a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PairNumber.java +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/PairNumber.java @@ -1,4 +1,4 @@ -package com.helger.jcodemodel.tests.basic.record; +package com.helger.jcodemodel.tests.record; public record PairNumber(T first, T second) { } diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Person.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/Person.java similarity index 50% rename from jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Person.java rename to jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/Person.java index b1263c36..e0348bc5 100644 --- a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Person.java +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/Person.java @@ -1,4 +1,4 @@ -package com.helger.jcodemodel.tests.basic.record; +package com.helger.jcodemodel.tests.record; public record Person(String name, Integer age) { } diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointDistance.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/PointDistance.java similarity index 71% rename from jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointDistance.java rename to jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/PointDistance.java index b3fab15d..ac9aa6bd 100644 --- a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointDistance.java +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/PointDistance.java @@ -1,4 +1,4 @@ -package com.helger.jcodemodel.tests.basic.record; +package com.helger.jcodemodel.tests.record; public record PointDistance(int x, int y) { diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointJavadoc.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/PointJavadoc.java similarity index 75% rename from jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointJavadoc.java rename to jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/PointJavadoc.java index c6b4996a..ff93f083 100644 --- a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointJavadoc.java +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/PointJavadoc.java @@ -1,4 +1,4 @@ -package com.helger.jcodemodel.tests.basic.record; +package com.helger.jcodemodel.tests.record; /** diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointStatic.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/PointStatic.java similarity index 80% rename from jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointStatic.java rename to jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/PointStatic.java index 982272fb..ca715f36 100644 --- a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/PointStatic.java +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/PointStatic.java @@ -1,4 +1,4 @@ -package com.helger.jcodemodel.tests.basic.record; +package com.helger.jcodemodel.tests.record; public record PointStatic(int x, int y) { public static final PointStatic ORIGIN = new PointStatic(0, 0); diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Range.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/Range.java similarity index 78% rename from jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Range.java rename to jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/Range.java index 0ba5bd76..1ce9f800 100644 --- a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/Range.java +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/Range.java @@ -1,4 +1,4 @@ -package com.helger.jcodemodel.tests.basic.record; +package com.helger.jcodemodel.tests.record; public record Range(int lo, int hi) { diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/RangeCanonical.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/RangeCanonical.java similarity index 82% rename from jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/RangeCanonical.java rename to jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/RangeCanonical.java index 01fb731a..9b343e89 100644 --- a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/RangeCanonical.java +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/RangeCanonical.java @@ -1,4 +1,4 @@ -package com.helger.jcodemodel.tests.basic.record; +package com.helger.jcodemodel.tests.record; public record RangeCanonical(int lo, int hi) { diff --git a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/SeriesVarArgs.java b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/SeriesVarArgs.java similarity index 54% rename from jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/SeriesVarArgs.java rename to jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/SeriesVarArgs.java index 29ff7a4a..9bf22edc 100644 --- a/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/basic/record/SeriesVarArgs.java +++ b/jcodemodeltests/src/generated/javatest/com/helger/jcodemodel/tests/record/SeriesVarArgs.java @@ -1,4 +1,4 @@ -package com.helger.jcodemodel.tests.basic.record; +package com.helger.jcodemodel.tests.record; public record SeriesVarArgs(String name, int... values) { } diff --git a/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/record/JRecordTestGen.java similarity index 99% rename from jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java rename to jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/record/JRecordTestGen.java index ac1c9f75..91c9d944 100644 --- a/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/basic/record/JRecordTestGen.java +++ b/jcodemodeltests/src/main/java/com/helger/jcodemodel/tests/record/JRecordTestGen.java @@ -1,4 +1,4 @@ -package com.helger.jcodemodel.tests.basic.record; +package com.helger.jcodemodel.tests.record; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java b/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java index 939e1349..79b91d11 100644 --- a/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java +++ b/jcodemodeltests/src/test/java/com/helger/jcodemodel/tests/record/JRecordTest.java @@ -47,9 +47,9 @@ import org.junit.Assert; import org.junit.Test; -import com.helger.jcodemodel.tests.basic.record.*; -import com.helger.jcodemodel.tests.basic.record.JRecordTestGen.RecordAnnotationExample; -import com.helger.jcodemodel.tests.basic.record.Outer.Inner; +import com.helger.jcodemodel.tests.record.*; +import com.helger.jcodemodel.tests.record.JRecordTestGen.RecordAnnotationExample; +import com.helger.jcodemodel.tests.record.Outer.Inner; /** * Test class for Java record support. Java records (JEP 395, Java 16+) are a special kind of class From 81bfa8c3388ecfc343f6d856a28491838af7f5af Mon Sep 17 00:00:00 2001 From: glelouet Date: Fri, 27 Feb 2026 14:36:55 +0100 Subject: [PATCH 11/14] reset to remove doc tab/space --- .../examples/plugin/csv/basic/EmptyClass.java | 16 ++++++++-------- .../examples/plugin/csv/basic/SimpleFields.java | 16 ++++++++-------- .../examples/plugin/csv/deeparray/Example2.java | 16 ++++++++-------- .../examples/plugin/csv/getset/Example3.java | 16 ++++++++-------- .../examples/plugin/csv/immutable/Animal.java | 16 ++++++++-------- .../examples/plugin/csv/immutable/Dog.java | 16 ++++++++-------- .../plugin/csv/immutable/WeirdReference.java | 16 ++++++++-------- .../examples/plugin/csv/inherit/City.java | 16 ++++++++-------- .../examples/plugin/csv/inherit/Dated.java | 16 ++++++++-------- .../examples/plugin/csv/inherit/Point.java | 16 ++++++++-------- .../plugin/csv/lastupdated/LastUpdated.java | 16 ++++++++-------- .../examples/plugin/csv/redirect/ABC.java | 16 ++++++++-------- .../plugin/csv/redirect/ClassRedirect.java | 16 ++++++++-------- .../examples/plugin/csv/redirect/Redirected.java | 16 ++++++++-------- .../examples/plugin/csv/resolve/Child.java | 16 ++++++++-------- .../examples/plugin/csv/resolve/Imported.java | 16 ++++++++-------- .../examples/plugin/csv/resolve/Parent.java | 16 ++++++++-------- .../java/com/helger/tests/helloworld/Hello.java | 16 ++++++++-------- .../com/helger/tests/helloworld/Hello2.java | 16 ++++++++-------- .../jcodemodel/examples/plugin/json/basic/A.java | 16 ++++++++-------- .../jcodemodel/examples/plugin/json/basic/B.java | 16 ++++++++-------- .../jcodemodel/examples/plugin/json/basic/C.java | 16 ++++++++-------- .../jcodemodel/examples/plugin/yaml/basic/A.java | 16 ++++++++-------- .../jcodemodel/examples/plugin/yaml/basic/B.java | 16 ++++++++-------- .../jcodemodel/examples/plugin/yaml/basic/C.java | 16 ++++++++-------- .../examples/plugin/yaml/basic/Empty1.java | 16 ++++++++-------- .../examples/plugin/yaml/basic/Empty2.java | 16 ++++++++-------- .../examples/plugin/yaml/basic/ListSon.java | 16 ++++++++-------- .../plugin/yaml/concrete/ConcreteList.java | 16 ++++++++-------- .../plugin/yaml/concrete/ConcreteMap.java | 16 ++++++++-------- .../plugin/yaml/concrete/ConcreteSet.java | 16 ++++++++-------- 31 files changed, 248 insertions(+), 248 deletions(-) diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/basic/EmptyClass.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/basic/EmptyClass.java index c8f3355d..ec35bd97 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/basic/EmptyClass.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/basic/EmptyClass.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.basic; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/basic/SimpleFields.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/basic/SimpleFields.java index 6d83b60e..9fd555cb 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/basic/SimpleFields.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/basic/SimpleFields.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.basic; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/deeparray/Example2.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/deeparray/Example2.java index 40ee2b8d..227f56ed 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/deeparray/Example2.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/deeparray/Example2.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.deeparray; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/getset/Example3.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/getset/Example3.java index 8389feb4..86a33e33 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/getset/Example3.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/getset/Example3.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.getset; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/Animal.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/Animal.java index eba3ef14..20f3b9e1 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/Animal.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/Animal.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.immutable; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/Dog.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/Dog.java index e42882a1..88642331 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/Dog.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/Dog.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.immutable; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/WeirdReference.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/WeirdReference.java index e48d7cf9..0cf5da41 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/WeirdReference.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/immutable/WeirdReference.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.immutable; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/City.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/City.java index cf6cc5aa..fdd3ee01 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/City.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/City.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.inherit; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/Dated.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/Dated.java index 3e366864..022ba76a 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/Dated.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/Dated.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.inherit; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/Point.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/Point.java index 55bafae9..ea3fb1a2 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/Point.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/inherit/Point.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.inherit; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/lastupdated/LastUpdated.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/lastupdated/LastUpdated.java index 7f868e8d..7eaa77de 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/lastupdated/LastUpdated.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/lastupdated/LastUpdated.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.lastupdated; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/ABC.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/ABC.java index 58acdb0b..50f9b011 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/ABC.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/ABC.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.redirect; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/ClassRedirect.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/ClassRedirect.java index 89b9d215..b3514eee 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/ClassRedirect.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/ClassRedirect.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.redirect; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/Redirected.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/Redirected.java index cd5dca85..18e2573c 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/Redirected.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/redirect/Redirected.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.redirect; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Child.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Child.java index ef448e89..d7985376 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Child.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Child.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.resolve; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Imported.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Imported.java index e9ab0abb..c4682ba2 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Imported.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Imported.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.resolve; diff --git a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Parent.java b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Parent.java index 322bea20..48beef03 100644 --- a/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Parent.java +++ b/examples/plugins/csv/src/generated/java/com/helger/jcodemodel/examples/plugin/csv/resolve/Parent.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.csv.resolve; diff --git a/examples/plugins/helloworld/src/generated/java/com/helger/tests/helloworld/Hello.java b/examples/plugins/helloworld/src/generated/java/com/helger/tests/helloworld/Hello.java index fd77c035..219f37b2 100644 --- a/examples/plugins/helloworld/src/generated/java/com/helger/tests/helloworld/Hello.java +++ b/examples/plugins/helloworld/src/generated/java/com/helger/tests/helloworld/Hello.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.tests.helloworld; diff --git a/examples/plugins/helloworld/src/generated/java2/com/helger/tests/helloworld/Hello2.java b/examples/plugins/helloworld/src/generated/java2/com/helger/tests/helloworld/Hello2.java index d1047a19..732455c0 100644 --- a/examples/plugins/helloworld/src/generated/java2/com/helger/tests/helloworld/Hello2.java +++ b/examples/plugins/helloworld/src/generated/java2/com/helger/tests/helloworld/Hello2.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.tests.helloworld; diff --git a/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/A.java b/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/A.java index 609f1007..a084c6b7 100644 --- a/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/A.java +++ b/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/A.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.json.basic; diff --git a/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/B.java b/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/B.java index d7c8da31..615482f7 100644 --- a/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/B.java +++ b/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/B.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.json.basic; diff --git a/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/C.java b/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/C.java index 8d388ba5..c2b14441 100644 --- a/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/C.java +++ b/examples/plugins/json/src/generated/java/com/helger/jcodemodel/examples/plugin/json/basic/C.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.json.basic; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/A.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/A.java index 5e345ab6..01396190 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/A.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/A.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.basic; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/B.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/B.java index 12591ad9..a7a84644 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/B.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/B.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.basic; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/C.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/C.java index c323bef7..f73761f0 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/C.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/C.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.basic; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/Empty1.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/Empty1.java index 60f58bf9..3e9c6c05 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/Empty1.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/Empty1.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.basic; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/Empty2.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/Empty2.java index 56a960b8..eb18b9b5 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/Empty2.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/Empty2.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.basic; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/ListSon.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/ListSon.java index e474878e..3b4858eb 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/ListSon.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/basic/ListSon.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.basic; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteList.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteList.java index f05e3a15..01526149 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteList.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteList.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.concrete; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteMap.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteMap.java index 90f14cc9..c2b6b702 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteMap.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteMap.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.concrete; diff --git a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteSet.java b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteSet.java index 2aec2c7c..1aff7324 100644 --- a/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteSet.java +++ b/examples/plugins/yaml/src/generated/java/com/helger/jcodemodel/examples/plugin/yaml/concrete/ConcreteSet.java @@ -1,15 +1,15 @@ /** * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.helger.jcodemodel.examples.plugin.yaml.concrete; From 7f01e371958076782d3e80d3f4619d59a2e0eb86 Mon Sep 17 00:00:00 2001 From: glelouet Date: Sun, 1 Mar 2026 17:22:13 +0100 Subject: [PATCH 12/14] create BOM architecture --- bom/pom.xml | 49 +++++++++++++++++++++++++++++++++++++++++ examples/pom.xml | 3 ++- jcodemodeltests/pom.xml | 3 ++- plugin/pom.xml | 3 ++- pom.xml | 19 +--------------- 5 files changed, 56 insertions(+), 21 deletions(-) create mode 100644 bom/pom.xml diff --git a/bom/pom.xml b/bom/pom.xml new file mode 100644 index 00000000..abf74be2 --- /dev/null +++ b/bom/pom.xml @@ -0,0 +1,49 @@ + + 4.0.0 + + com.helger.jcodemodel + jcodemodel-parent-pom + 4.2.0-SNAPSHOT + + bom + POM JCM BOM + pom + + + + + + com.helger + jcodemodel + ${project.version} + + + com.helger.jcodemodel.plugin.generators + csv + ${project.version} + + + com.helger.jcodemodel.plugin.generators + json + ${project.version} + + + com.helger.jcodemodel.plugin.generators + yaml + ${project.version} + + + + + + + + + com.helger.jcodemodel + jcodemodel-maven-plugin + ${project.version} + + + + + \ No newline at end of file diff --git a/examples/pom.xml b/examples/pom.xml index b7958ac4..b34d10a2 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -19,8 +19,9 @@ 4.0.0 com.helger.jcodemodel - jcodemodel-parent-pom + bom 4.2.0-SNAPSHOT + ../bom examples pom diff --git a/jcodemodeltests/pom.xml b/jcodemodeltests/pom.xml index ccc3abb0..ed2af35c 100644 --- a/jcodemodeltests/pom.xml +++ b/jcodemodeltests/pom.xml @@ -2,8 +2,9 @@ 4.0.0 com.helger.jcodemodel - jcodemodel-parent-pom + bom 4.2.0-SNAPSHOT + ../bom JCodeModel-Tests diff --git a/plugin/pom.xml b/plugin/pom.xml index 2492d07d..30347dbd 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -19,8 +19,9 @@ 4.0.0 com.helger.jcodemodel - jcodemodel-parent-pom + bom 4.2.0-SNAPSHOT + ../bom plugin pom diff --git a/pom.xml b/pom.xml index 6423a0d0..f46d1649 100644 --- a/pom.xml +++ b/pom.xml @@ -112,6 +112,7 @@ + bom jcodemodel plugin examples @@ -128,25 +129,7 @@ pom import - - - - com.helger - jcodemodel - ${project.version} -
- - - - - com.helger.jcodemodel - jcodemodel-maven-plugin - ${project.version} - - - - From c562793f9ec683f3e2e4ae99e1f463596120288e Mon Sep 17 00:00:00 2001 From: glelouet Date: Sun, 1 Mar 2026 17:32:20 +0100 Subject: [PATCH 13/14] forgot historic project --- jcodemodel/pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jcodemodel/pom.xml b/jcodemodel/pom.xml index 1b11c7de..2353e3f7 100644 --- a/jcodemodel/pom.xml +++ b/jcodemodel/pom.xml @@ -44,8 +44,9 @@ 4.0.0 com.helger.jcodemodel - jcodemodel-parent-pom + bom 4.2.0-SNAPSHOT + ../bom com.helger jcodemodel From d1bfdad7b589f1e4acbb438d58a10c6e408aba48 Mon Sep 17 00:00:00 2001 From: glelouet Date: Sun, 1 Mar 2026 17:46:42 +0100 Subject: [PATCH 14/14] added bom explanation in readme --- README.md | 43 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 137132a1..c0283c87 100644 --- a/README.md +++ b/README.md @@ -3,23 +3,52 @@ A fork of the com.sun.codemodel 2.7-SNAPSHOT. The classes in this project use a different package name `com.helger.jcodemodel` to avoid conflicts with other `com.sun.codemodel` instances that might be floating around in the classpath. -That of course implies, that this artefact cannot directly be used with JAXB, since the configuration of +That of course implies, that this artifact cannot directly be used with JAXB, since the configuration of this would be very tricky. A site with the links to the [API docs](http://phax.github.io/jcodemodel/) etc. is available. -## Maven usage +## Import in Maven + +### Straightforward import Add the following to your pom.xml to use this artifact (where `x.y.z` denotes the version): ```xml - - com.helger - jcodemodel - x.y.z - + + + + com.helger + jcodemodel + x.y.z + ``` +### Bill Of Materials import + +In case you want to use several of our projects, you may import the bom first, then the required modules : + +```xml + + + + + com.helger.jcodemodel + bom + x.y.z + pom + import + +... + + + com.helger + jcodemodel + +``` + +In that case, the bom import defines the version of the other projects. + # News and noteworthy v4.2.0 - work in progress