We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 394f05d commit 9e3ffbeCopy full SHA for 9e3ffbe
docs/domain.rst
@@ -59,6 +59,23 @@ The value ``new`` means that the object of annotated class is created with a con
59
60
.. _records: https://openjdk.java.net/jeps/359
61
62
+.. warning::
63
+
64
+ To annotate records with ``@Domain`` is a little redundant,
65
+ because you must specify some properties to ``@Domain`` such as ``valueType``.
66
+ Instead of ``@Domain``, you can annotate records with ``@DataType``:
67
68
+ .. code-block:: java
69
70
+ @DataType
71
+ public record PhoneNumber(String value) {
72
+ public String getAreaCode() {
73
+ ...
74
+ }
75
76
77
+ But note that ``@DataType`` is an experimental feature.
78
79
80
Instantiation with a static factory method
81
------------------------------------------
0 commit comments