Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions java/developing-applications/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ Moreover, it doesn't change the way how event contexts, delivered by CAP, look l

Other options in this goal enable or disable certain features that change the way generated code looks in a certain aspect. These changes can be incompatible with the existing code and require manual adaptation.

- [`strictSetters`](../assets/cds-maven-plugin-site/generate-mojo.html#strictSetters)
##### `strictSetters` { #codegen-strictSetters }

This switch changes the signature of the setter methods in typed access interfaces so that they require concrete type instead of generic `Map` interface.
For example:
Expand All @@ -549,12 +549,12 @@ Other options in this goal enable or disable certain features that change the wa

It does not introduce any additional type checks at runtime, the correctness of the assignment is checked only at the time of compilation.

- [`interfacesForAspects`](../assets/cds-maven-plugin-site/generate-mojo.html#interfacesForAspects)
##### `interfacesForAspects` { #codegen-interfacesForAspects }

If your entity is modelled with the [composition of aspects](../../cds/cdl#with-named-targets), the generated interfaces always reference original aspect as type for setters and getters.
When this switch is enabled, the code generator uses the type generated by the compiler instead of the type of the aspect itself and will include methods to fetch keys, for example.

- [`betterNames`](../assets/cds-maven-plugin-site/generate-mojo.html#betterNames)
##### `betterNames` { #codegen-betterNames }

CDS models from external sources might include elements that have some special characters in their names or include elements that clash with Java keywords. Such cases always can be solved with the [renaming features](../cds-data#renaming-elements-in-java) provided by code generator, but in case of large models, this is tedious.
When this switch is enabled, characters `/` and `$` behave as a separators for the name during case conversions, similar to `_` and `.`. For example, `GET_MATERIAL` yields `GetMaterial` (or `getMaterial` for attributes and methods). The same now applies for the names with `/`, for example, name `/DMO/GET_MATERIAL` will be converted to `DmoGetMaterial`.
Expand All @@ -565,11 +565,11 @@ Other options in this goal enable or disable certain features that change the wa
- Leading `_` will remain in the name after conversions. This supports conventions where an association and its foreign key have names like `_assoc` and `assoc`.
These conversions no longer influence the splitting.

- [`cqnServiceGetters`](../assets/cds-maven-plugin-site/generate-mojo.html#cqnServiceGetters)
##### `cqnServiceGetters` { #codegen-cqnServiceGetters }

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)
##### `generateClasses` { #codegen-generateClasses }

Generates static class-based implementations for interfaces, replacing dynamic proxies at runtime.
This significantly improves performance and removes the limit on the number of methods an accessor interface may declare.
Expand Down
Loading