From 811c0f860333c93e399691abd7b4c93cb5e7d252 Mon Sep 17 00:00:00 2001 From: Vladimir Mikhaylenko Date: Wed, 17 Jun 2026 15:32:36 +0200 Subject: [PATCH 1/5] Document `generateClasses` --- java/developing-applications/building.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/java/developing-applications/building.md b/java/developing-applications/building.md index 5916fb860d..d74d488175 100644 --- a/java/developing-applications/building.md +++ b/java/developing-applications/building.md @@ -575,6 +575,15 @@ Other options in this goal enable or disable certain features that change the wa The method `getService()` in generated [event-specific Event Context interfaces](../event-handlers/#eventcontext) is overridden to return the typed service interface instead of the generic `Service` type. +- [`generateClasses`](../assets/cds-maven-plugin-site/generate-mojo.html#generateClasses) + + Generates static class-based implementations for interfaces instead of JDK proxies at runtime. + This slightly improves performance and lifts the JDK limit on the number of methods an interface may declare. + + The generated classes are internal; do not reference them directly in application code. + + Interfaces from libraries or created manually are still implemented as JDK proxies at runtime. + :::warning Check migration guides! In major releases of CAP Java, some of these switches can be made the new default and some other switches might be removed. This might introduce compile errors in your application that needs to be fixed. From 1ef72811c7b9d6a151d65ea1a367ff1e4197c8d7 Mon Sep 17 00:00:00 2001 From: Vladimir Mikhaylenko Date: Wed, 17 Jun 2026 16:55:45 +0200 Subject: [PATCH 2/5] improve --- java/developing-applications/building.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/developing-applications/building.md b/java/developing-applications/building.md index d74d488175..1ae5dc0bd5 100644 --- a/java/developing-applications/building.md +++ b/java/developing-applications/building.md @@ -577,12 +577,12 @@ Other options in this goal enable or disable certain features that change the wa - [`generateClasses`](../assets/cds-maven-plugin-site/generate-mojo.html#generateClasses) - Generates static class-based implementations for interfaces instead of JDK proxies at runtime. - This slightly improves performance and lifts the JDK limit on the number of methods an interface may declare. + Generates static class-based implementations for interfaces, replacing dynamic proxies at runtime. + This improves performance and removes the limit on the number of methods an interface may declare. - The generated classes are internal; do not reference them directly in application code. + The generated classes are internal — do not reference them directly in application code. - Interfaces from libraries or created manually are still implemented as JDK proxies at runtime. + Interfaces not produced by the code generator are still implemented dynamically, falling back to proxies when no static implementation exists. :::warning Check migration guides! In major releases of CAP Java, some of these switches can be made the new default and some other switches might be removed. This might introduce compile errors From be7c89ae32d0daecf0296b3b1616d4ea4df9a0db Mon Sep 17 00:00:00 2001 From: Vladimir Date: Thu, 18 Jun 2026 09:37:31 +0200 Subject: [PATCH 3/5] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Adrian Görler --- java/developing-applications/building.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/developing-applications/building.md b/java/developing-applications/building.md index 1ae5dc0bd5..22168b4685 100644 --- a/java/developing-applications/building.md +++ b/java/developing-applications/building.md @@ -578,11 +578,11 @@ Other options in this goal enable or disable certain features that change the wa - [`generateClasses`](../assets/cds-maven-plugin-site/generate-mojo.html#generateClasses) Generates static class-based implementations for interfaces, replacing dynamic proxies at runtime. - This improves performance and removes the limit on the number of methods an interface may declare. + This improves the performance significantly. It also removes the limit on the number of methods an interface may declare. - The generated classes are internal — do not reference them directly in application code. + The generated classes are internal — do not reference them directly from application code. - Interfaces not produced by the code generator are still implemented dynamically, falling back to proxies when no static implementation exists. + Hand-written [accessor interfaces](../cds-data#typed-access), for which no implementation class is generated, are still supported by falling back to using [proxies](../cds-data#cds-data). :::warning Check migration guides! In major releases of CAP Java, some of these switches can be made the new default and some other switches might be removed. This might introduce compile errors From 4381810982bc898a6da1f47f697cfa04d08786bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20G=C3=B6rler?= Date: Thu, 18 Jun 2026 09:41:57 +0200 Subject: [PATCH 4/5] Update java/developing-applications/building.md --- java/developing-applications/building.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/developing-applications/building.md b/java/developing-applications/building.md index 22168b4685..a316e35b19 100644 --- a/java/developing-applications/building.md +++ b/java/developing-applications/building.md @@ -578,7 +578,7 @@ Other options in this goal enable or disable certain features that change the wa - [`generateClasses`](../assets/cds-maven-plugin-site/generate-mojo.html#generateClasses) Generates static class-based implementations for interfaces, replacing dynamic proxies at runtime. - This improves the performance significantly. It also removes the limit on the number of methods an interface may declare. + This improves the performance significantly. It also removes the limit on the number of methods an accessor interface may declare. The generated classes are internal — do not reference them directly from application code. From 305cf9536b96328db6f091ad65d989a29adb9587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Jeglinsky?= Date: Thu, 18 Jun 2026 10:01:29 +0200 Subject: [PATCH 5/5] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: René Jeglinsky --- java/developing-applications/building.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/developing-applications/building.md b/java/developing-applications/building.md index a316e35b19..8d2b6659aa 100644 --- a/java/developing-applications/building.md +++ b/java/developing-applications/building.md @@ -578,11 +578,11 @@ Other options in this goal enable or disable certain features that change the wa - [`generateClasses`](../assets/cds-maven-plugin-site/generate-mojo.html#generateClasses) Generates static class-based implementations for interfaces, replacing dynamic proxies at runtime. - This improves the performance significantly. It also removes the limit on the number of methods an accessor interface may declare. + This significantly improves performance and removes the limit on the number of methods an accessor interface may declare. The generated classes are internal — do not reference them directly from application code. - Hand-written [accessor interfaces](../cds-data#typed-access), for which no implementation class is generated, are still supported by falling back to using [proxies](../cds-data#cds-data). + Hand-written [accessor interfaces](../cds-data#typed-access), for which no implementation class is generated, are still supported via [proxy](../cds-data#cds-data) fallback. :::warning Check migration guides! In major releases of CAP Java, some of these switches can be made the new default and some other switches might be removed. This might introduce compile errors