Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
9dce63a
chore: Started defining the new buffer-api kicking off the SPI3 refac…
chrisdutz Dec 8, 2025
f7d048c
chore: Removed some accidentally committed files.
chrisdutz Dec 8, 2025
2c419f9
feat: Implemented a first version of the byte-based buffers along wit…
chrisdutz Dec 12, 2025
5b57048
feat: Implemented a first version of the xml-based and ported the asc…
chrisdutz Dec 22, 2025
0b03d7f
refactor: Updated the box-based buffer to operate without external de…
chrisdutz Dec 22, 2025
dc6553d
refactor: Updated the box-based buffer to operate without external de…
chrisdutz Dec 22, 2025
5cafd70
refactor: Updated the box-based buffer to operate without external de…
chrisdutz Dec 22, 2025
f27d930
build(deps): bump org.sonarsource.scanner.maven:sonar-maven-plugin (#…
dependabot[bot] Dec 8, 2025
9b81b90
build(deps): bump org.apache.commons:commons-text from 1.14.0 to 1.15…
dependabot[bot] Dec 8, 2025
44b5829
build(deps): bump com.google.googlejavaformat:google-java-format (#2379)
dependabot[bot] Dec 8, 2025
f48224b
build(deps): bump golang.org/x/net from 0.47.0 to 0.48.0 in /plc4go (…
dependabot[bot] Dec 9, 2025
3b797ff
build(deps): bump golang.org/x/tools from 0.39.0 to 0.40.0 in /plc4go…
dependabot[bot] Dec 9, 2025
4c42c11
chore(build): use different sdk site
sruehl Dec 9, 2025
3ccf206
build(deps): bump com.igormaznitsa:gosdk-wrapper-maven-plugin (#2390)
dependabot[bot] Dec 10, 2025
cb4d5a4
build(deps): bump mockito.version from 5.20.0 to 5.21.0 (#2389)
dependabot[bot] Dec 10, 2025
558d10b
build(deps): bump com.gradle:develocity-maven-extension (#2391)
dependabot[bot] Dec 11, 2025
aba0b90
doc: Added documentation for a set of test-structures and initializta…
chrisdutz Dec 12, 2025
1171940
build(deps): bump org.apache.maven.plugins:maven-release-plugin (#2397)
dependabot[bot] Dec 15, 2025
2a8d433
build(deps): bump actions/upload-artifact from 5 to 6 (#2396)
dependabot[bot] Dec 15, 2025
fa2a9ae
build(deps): bump io.vavr:vavr from 0.10.7 to 0.11.0 (#2395)
dependabot[bot] Dec 15, 2025
3d78a51
build(deps): bump actions/cache from 4 to 5 (#2393)
dependabot[bot] Dec 15, 2025
d21f9b3
build(deps): bump logback.version from 1.5.21 to 1.5.22 (#2392)
dependabot[bot] Dec 15, 2025
1a584f2
build(deps-dev): bump org.testcontainers:testcontainers (#2400)
dependabot[bot] Dec 16, 2025
8577a39
build(deps-dev): bump org.testcontainers:junit-jupiter (#2399)
dependabot[bot] Dec 16, 2025
c9eea1b
build(deps): bump org.apache.karaf.tooling:karaf-maven-plugin (#2398)
dependabot[bot] Dec 16, 2025
8d2016e
build(deps): bump org.jetbrains.kotlin:kotlin-stdlib (#2402)
dependabot[bot] Dec 17, 2025
9044d32
build(deps): bump org.apache.maven:maven-artifact from 3.9.11 to 3.9.…
dependabot[bot] Dec 17, 2025
2db73b9
refactor: Added the queryName to the browse request interceptor inter…
chrisdutz Dec 31, 2025
464d081
build(deps): bump dorny/test-reporter from 2.3.0 to 2.5.0 (#2409)
dependabot[bot] Jan 5, 2026
ead9032
build(deps): bump org.codehaus.mojo:exec-maven-plugin (#2405)
dependabot[bot] Jan 5, 2026
e1b6c37
build(deps): bump net.bytebuddy:byte-buddy from 1.18.2 to 1.18.3 (#2404)
dependabot[bot] Jan 5, 2026
708e7be
build(deps): bump logback.version from 1.5.22 to 1.5.23 (#2403)
dependabot[bot] Jan 5, 2026
89ecceb
build(deps): bump nl.jqno.equalsverifier:equalsverifier (#2412)
dependabot[bot] Jan 6, 2026
51b0fa2
build(deps): bump com.github.eirslett:frontend-maven-plugin (#2411)
dependabot[bot] Jan 6, 2026
b0de760
build(deps-dev): bump org.json:json from 20250517 to 20251224 (#2410)
dependabot[bot] Jan 6, 2026
9add874
build(deps): bump org.junit:junit-bom from 6.0.1 to 6.0.2 (#2415)
dependabot[bot] Jan 7, 2026
e8da04a
build(deps): bump logback.version from 1.5.23 to 1.5.24 (#2414)
dependabot[bot] Jan 7, 2026
3b90dd3
build(deps): bump org.apache:apache from 35 to 36 (#2413)
dependabot[bot] Jan 7, 2026
d710b53
feat: Added a new PlcCertificateAuthentication type to the API module.
chrisdutz Jan 9, 2026
a1877c9
feat: Add github link to header
hutcheb Jan 10, 2026
76c4360
refactor: Refactored the ConnectionStateListener to allow reporting m…
chrisdutz Jan 11, 2026
d958bed
fix: Updated the prereqisiteCheck to also deal with new versions of l…
chrisdutz Jan 11, 2026
2547ef6
build(deps): bump golang.org/x/text from 0.32.0 to 0.33.0 in /plc4go …
dependabot[bot] Jan 12, 2026
8986f19
chore: Cleanup after merging in changes from develop
chrisdutz Jan 12, 2026
d8e188c
chore: Added updated "values", "fields" and "utlis" modules, which ar…
chrisdutz Jan 12, 2026
780995a
chore: Added a new code-generation module based on JavaPoet and integ…
chrisdutz Jan 12, 2026
a150791
chore: Updated the mspecs for the new style of handling encoding, byt…
chrisdutz Jan 12, 2026
23ad80f
fix: Resolved some build issues related to missing apache headers.
chrisdutz Jan 12, 2026
ff35305
chore: Updated the utils and tools to handle the updated api
chrisdutz Jan 12, 2026
a2fbbac
chore: Finished implementing support for referencing DataIo types in …
chrisdutz Jan 13, 2026
4633b1f
chore: Fine-tuned the generator for some of the mspecs I added back r…
chrisdutz Jan 13, 2026
05b5104
chore: Fine-tuned the mspecs, I recently added back to be compatible …
chrisdutz Jan 13, 2026
de511c5
chore: Updated the code generated by the code-generator as proof that…
chrisdutz Jan 13, 2026
26d9b6d
feat: Added the config code in a separate spi module.
chrisdutz Jan 28, 2026
6e1c800
feat: Added the audit-log functionality.
chrisdutz Jan 28, 2026
4602b8a
chore: Update of the knx vendor ids.
chrisdutz Jan 28, 2026
a2cbfeb
feat: Added the API module for the new transports.
chrisdutz Feb 2, 2026
4e8bd26
Merge remote-tracking branch 'refs/remotes/origin/develop' into refac…
chrisdutz Feb 2, 2026
99a83bb
chore: Added missing Apache headers to the README.md
chrisdutz Feb 2, 2026
cee1472
feat: Added a first version of a new TCP transport including comprehe…
chrisdutz Feb 2, 2026
428b9fe
feat: Added a first version of a new TCP transport including comprehe…
chrisdutz Feb 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
150 changes: 150 additions & 0 deletions code-generation/language/java-jp/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you 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

https://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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-code-generation-language</artifactId>
<version>0.14.0-SNAPSHOT</version>
</parent>

<artifactId>plc4x-code-generation-language-java-jp</artifactId>

<name>Code-Generation: Language: Java (JavaPoet)</name>
<description>Code generation template for generating Java code (JavaPoet based version for SPI3)</description>

<properties>
<project.build.outputTimestamp>2025-08-02T13:55:11Z</project.build.outputTimestamp>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<executions>
<execution>
<id>integration-test</id>
<goals>
<!-- Install the current project artifacts into the maven local repo, so they can be used in the test -->
<goal>install</goal>
<!-- Execute the maven builds defines in src/test/resources -->
<goal>integration-test</goal>
<!-- Checks the results of the maven builds -->
<goal>verify</goal>
</goals>
<configuration>
<skipInvocation>${skip-code-generation-tests}</skipInvocation>
<debug>true</debug>
<!-- Use the "test" scope for filling the tests local repository -->
<scope>test</scope>
<streamLogsOnFailures>true</streamLogsOnFailures>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
<projectsDirectory>src/test/resources</projectsDirectory>
<cloneProjectsTo>${project.build.directory}/integration-tests</cloneProjectsTo>
<settingsFile>src/test/resources/settings.xml</settingsFile>
<extraArtifacts>
<extraArtifact>org.apache.plc4x.plugins:plc4x-code-generation-language-base:${plc4x-code-generation.version}</extraArtifact>
<extraArtifact>org.apache.plc4x.plugins:plc4x-maven-plugin:${plc4x-code-generation.version}</extraArtifact>
<extraArtifact>org.apache.plc4x.plugins:plc4x-code-generation-protocol-base:${plc4x-code-generation.version}</extraArtifact>
<extraArtifact>org.apache.plc4x.plugins:plc4x-code-generation-types-base:${plc4x-code-generation.version}</extraArtifact>
</extraArtifacts>
<pomIncludes>
<pomInclude>*/pom.xml</pomInclude>
</pomIncludes>
<mavenOpts>--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</mavenOpts>
<!-- The goals we will be executing in the test-projects -->
<goals>
<goal>test</goal>
</goals>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<!-- PLC4J API -->
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-api</artifactId>
<version>0.14.0-SNAPSHOT</version>
</dependency>

<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<!-- PLC4X Code Generation Dependencies -->
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-code-generation-protocol-base-mspec</artifactId>
<version>0.14.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.apache.plc4x.plugins</groupId>
<artifactId>plc4x-code-generation-types-base</artifactId>
<version>${plc4x-code-generation.version}</version>
</dependency>
<dependency>
<groupId>org.apache.plc4x.plugins</groupId>
<artifactId>plc4x-code-generation-language-base</artifactId>
<version>${plc4x-code-generation.version}</version>
</dependency>

<!-- Just needed for some utility methods -->
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-spi-utils</artifactId>
<version>0.14.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-spi-buffers-api</artifactId>
<version>0.14.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-spi-buffers-byte</artifactId>
<version>0.14.0-SNAPSHOT</version>
</dependency>

<!-- https://github.com/palantir/javapoet -->
<dependency>
<groupId>com.palantir.javapoet</groupId>
<artifactId>javapoet</artifactId>
<version>0.7.0</version>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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
*
* 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.
*/

package org.apache.plc4x.codegeneration.language.java;

import org.apache.plc4x.codegeneration.language.java.generators.ComplexTypeGenerator;
import org.apache.plc4x.codegeneration.language.java.generators.ConstantsTypeGenerator;
import org.apache.plc4x.codegeneration.language.java.generators.DataIoGenerator;
import org.apache.plc4x.codegeneration.language.java.generators.EnumGenerator;
import org.apache.plc4x.java.spi.buffers.api.exceptions.BufferException;
import org.apache.plc4x.plugins.codegenerator.language.LanguageOutput;
import org.apache.plc4x.plugins.codegenerator.language.mspec.model.definitions.DefaultComplexTypeDefinition;
import org.apache.plc4x.plugins.codegenerator.language.mspec.model.definitions.DefaultDataIoTypeDefinition;
import org.apache.plc4x.plugins.codegenerator.language.mspec.model.definitions.DefaultDiscriminatedComplexTypeDefinition;
import org.apache.plc4x.plugins.codegenerator.language.mspec.model.definitions.DefaultEnumTypeDefinition;
import org.apache.plc4x.plugins.codegenerator.language.mspec.model.terms.DefaultBooleanLiteral;
import org.apache.plc4x.plugins.codegenerator.types.definitions.ConstantsTypeDefinition;
import org.apache.plc4x.plugins.codegenerator.types.definitions.TypeDefinition;
import org.apache.plc4x.plugins.codegenerator.types.exceptions.GenerationException;
import org.apache.plc4x.plugins.codegenerator.types.terms.BooleanLiteral;
import org.apache.plc4x.plugins.codegenerator.types.terms.Term;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.File;
import java.util.*;
import java.util.stream.Collectors;

public class JavaLanguageOutput implements LanguageOutput {

private static final Logger LOGGER = LoggerFactory.getLogger(JavaLanguageOutput.class);

private final Formatter formatter = new Formatter();

@Override
public String getName() {
return "Java";
}

@Override
public Set<String> supportedOptions() {
return new HashSet<>(Arrays.asList(
// Overrides the package name generated.
"package",
// Generates additional properties to save values of reserved fields for the case that the value differs from the expected value.
"generate-properties-for-reserved-fields",
// Map containing the type-names for external types.
"externalTypes"));
}

@Override
@SuppressWarnings("unchecked")
public void generate(File outputRootDir, String version, String languageName, String protocolName, String outputFlavor, Map<String, TypeDefinition> types, Map<String, Object> options) throws GenerationException {
Map<String, String> externalTypes = (Map<String, String>) options.get("externalTypes");

String targetPackage = (String) options.getOrDefault("package", "org.apache.plc4x." + languageName + "." + protocolName.replace("-", "") + "." + outputFlavor.replace("-", ""));
File outputDirectory = new File(outputRootDir, targetPackage.replace('.', '/'));
if (!outputDirectory.exists() && !outputDirectory.mkdirs()) {
throw new GenerationException("Unable to create output directory " + outputDirectory);
}

// Output a general plan of what we are planning on generating.
outputGenerationPlan(types);

try {
ArrayList<ConstantsTypeDefinition> constantTypes = types.values().stream().filter(typeDefinition -> typeDefinition instanceof ConstantsTypeDefinition).map(typeDefinition -> (ConstantsTypeDefinition) typeDefinition).collect(Collectors.toCollection(ArrayList::new));
ConstantsTypeGenerator constantsTypeGenerator = new ConstantsTypeGenerator(targetPackage, outputDirectory, outputRootDir, types, externalTypes, options);
for (ConstantsTypeDefinition constantType : constantTypes) {
Term external = constantType.getAttribute("external").orElse(new DefaultBooleanLiteral(false));
// Only output a file if it's not an "external" type.
if (external.isLiteral() &&
((external.asLiteral().orElseThrow() instanceof BooleanLiteral) &&
!((BooleanLiteral) external.asLiteral().orElseThrow()).getValue())) {
constantsTypeGenerator.generate(constantType);
}
}

ArrayList<DefaultComplexTypeDefinition> rootComplexTypes = types.values().stream().filter(typeDefinition -> typeDefinition instanceof DefaultComplexTypeDefinition).map(typeDefinition -> (DefaultComplexTypeDefinition) typeDefinition).filter(defaultComplexTypeDefinition -> !((defaultComplexTypeDefinition instanceof DefaultDiscriminatedComplexTypeDefinition) || (defaultComplexTypeDefinition instanceof DefaultDataIoTypeDefinition))).collect(Collectors.toCollection(ArrayList::new));
ComplexTypeGenerator complexTypeGenerator = new ComplexTypeGenerator(targetPackage, outputDirectory, outputRootDir, types, externalTypes, options);
for (DefaultComplexTypeDefinition rootComplexType : rootComplexTypes) {
Term external = rootComplexType.getAttribute("external").orElse(new DefaultBooleanLiteral(false));
// Only output a file if it's not an "external" type.
if (external.isLiteral() &&
((external.asLiteral().orElseThrow() instanceof BooleanLiteral) &&
!((BooleanLiteral) external.asLiteral().orElseThrow()).getValue())) {
complexTypeGenerator.generate(rootComplexType);

// Generate the children of this type (if he has any):
if (rootComplexType.isAbstract()) {
generateChildren(rootComplexType, types, complexTypeGenerator);
}
}
}

ArrayList<DefaultEnumTypeDefinition> enumTypes = types.values().stream().filter(typeDefinition -> typeDefinition instanceof DefaultEnumTypeDefinition).map(typeDefinition -> (DefaultEnumTypeDefinition) typeDefinition).collect(Collectors.toCollection(ArrayList::new));
EnumGenerator enumGenerator = new EnumGenerator(targetPackage, outputDirectory, outputRootDir, types, externalTypes, options);
for (DefaultEnumTypeDefinition enumType : enumTypes) {
Term external = enumType.getAttribute("external").orElse(new DefaultBooleanLiteral(false));
// Only output a file if it's not an "external" type.
if (external.isLiteral() &&
((external.asLiteral().orElseThrow() instanceof BooleanLiteral) &&
!((BooleanLiteral) external.asLiteral().orElseThrow()).getValue())) {
enumGenerator.generate(enumType);
}
}

ArrayList<DefaultDataIoTypeDefinition> dataIoTypes = types.values().stream().filter(typeDefinition -> typeDefinition instanceof DefaultDataIoTypeDefinition).map(typeDefinition -> (DefaultDataIoTypeDefinition) typeDefinition).collect(Collectors.toCollection(ArrayList::new));
DataIoGenerator dataIoGenerator = new DataIoGenerator(targetPackage, outputDirectory, outputRootDir, types, externalTypes, options);
for (DefaultDataIoTypeDefinition ioType : dataIoTypes) {
Term external = ioType.getAttribute("external").orElse(new DefaultBooleanLiteral(false));
// Only output a file if it's not an "external" type.
if (external.isLiteral() &&
((external.asLiteral().orElseThrow() instanceof BooleanLiteral) &&
!((BooleanLiteral) external.asLiteral().orElseThrow()).getValue())) {
dataIoGenerator.generate(ioType);
}
}
} catch (BufferException e) {
throw new GenerationException("Error while generating code", e);
}
}

@Override
public List<String> supportedOutputFlavors() {
return Arrays.asList("read-write", "read-only", "passive");
}

protected void outputGenerationPlan(Map<String, TypeDefinition> types) {
LOGGER.info("");
LOGGER.info("Complex Types:");
ArrayList<DefaultComplexTypeDefinition> rootComplexTypes = types.values().stream().filter(typeDefinition -> typeDefinition instanceof DefaultComplexTypeDefinition).map(typeDefinition -> (DefaultComplexTypeDefinition) typeDefinition).filter(defaultComplexTypeDefinition -> !((defaultComplexTypeDefinition instanceof DefaultDiscriminatedComplexTypeDefinition) || (defaultComplexTypeDefinition instanceof DefaultDataIoTypeDefinition))).collect(Collectors.toCollection(ArrayList::new));
rootComplexTypes.forEach(defaultComplexTypeDefinition -> {
LOGGER.info(" - {}", defaultComplexTypeDefinition.getName());
// List the children of this type:
if (defaultComplexTypeDefinition.isAbstract()) {
listChildren(defaultComplexTypeDefinition, types, " - ");
}
});
LOGGER.info("");

LOGGER.info("Enum Types:");
ArrayList<DefaultEnumTypeDefinition> enumTypes = types.values().stream().filter(typeDefinition -> typeDefinition instanceof DefaultEnumTypeDefinition).map(typeDefinition -> (DefaultEnumTypeDefinition) typeDefinition).collect(Collectors.toCollection(ArrayList::new));
enumTypes.forEach(defaultEnumTypeDefinition -> {
LOGGER.info(" - {}", defaultEnumTypeDefinition.getName());
});
LOGGER.info("");

LOGGER.info("DataIo Types:");
ArrayList<DefaultDataIoTypeDefinition> dataIoTypes = types.values().stream().filter(typeDefinition -> typeDefinition instanceof DefaultDataIoTypeDefinition).map(typeDefinition -> (DefaultDataIoTypeDefinition) typeDefinition).collect(Collectors.toCollection(ArrayList::new));
dataIoTypes.forEach(defaultEnumTypeDefinition -> {
LOGGER.info(" - {}", defaultEnumTypeDefinition.getName());
});
}

protected void listChildren(DefaultComplexTypeDefinition parent, Map<String, TypeDefinition> types, String indent) {
ArrayList<DefaultComplexTypeDefinition> children = types.values().stream().filter(typeDefinition -> typeDefinition instanceof DefaultComplexTypeDefinition).map(typeDefinition -> (DefaultComplexTypeDefinition) typeDefinition).filter(defaultComplexTypeDefinition -> defaultComplexTypeDefinition.getParentType().isPresent() && defaultComplexTypeDefinition.getParentType().get() == parent).collect(Collectors.toCollection(ArrayList::new));
children.forEach(child -> {
LOGGER.info("{}{}", indent, child.getName());
if (child.isAbstract()) {
listChildren(child, types, " " + indent);
}
});
}

protected void generateChildren(DefaultComplexTypeDefinition parent, Map<String, TypeDefinition> types, ComplexTypeGenerator complexTypeGenerator) throws BufferException {
ArrayList<DefaultComplexTypeDefinition> children = types.values().stream().filter(typeDefinition -> typeDefinition instanceof DefaultComplexTypeDefinition).map(typeDefinition -> (DefaultComplexTypeDefinition) typeDefinition).filter(defaultComplexTypeDefinition -> defaultComplexTypeDefinition.getParentType().isPresent() && defaultComplexTypeDefinition.getParentType().get() == parent).collect(Collectors.toCollection(ArrayList::new));
for (DefaultComplexTypeDefinition child : children) {
complexTypeGenerator.generate(child);
if (child.isAbstract()) {
generateChildren(child, types, complexTypeGenerator);
}
}
}

}
Loading
Loading