Skip to content

Commit ff205e0

Browse files
authored
Add documentation about JPMS (#758)
* Add documentation about JPMS * Format
1 parent 24964fd commit ff205e0

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ User Documentation
5959
lombok-support
6060
kotlin-support
6161
slf4j-support
62+
jpms-support
6263

6364
About Doma
6465
==========

docs/jpms-support.rst

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
=============
2+
JPMS support
3+
=============
4+
5+
.. contents::
6+
:depth: 3
7+
8+
Overview
9+
========
10+
11+
Doma supports the Java Platform Module System (JPMS) introduced with Java 9.
12+
13+
Modules
14+
=======
15+
16+
Doma provides the following modules:
17+
18+
+----------------+------------------------------------+
19+
| Artifact ID | Module Name |
20+
+================+====================================+
21+
| doma-core | org.seasar.doma.core |
22+
+----------------+------------------------------------+
23+
| doma-kotlin | org.seasar.doma.kotlin |
24+
+----------------+------------------------------------+
25+
| doma-processor | org.seasar.doma.processor |
26+
+----------------+------------------------------------+
27+
| doma-slf4j | org.seasar.doma.slf4j |
28+
+----------------+------------------------------------+
29+
30+
Usage
31+
=====
32+
33+
Doma uses reflection to access Entity properties.
34+
For this to work, you have to open packages containing Entity classes:
35+
36+
.. code-block:: java
37+
38+
module example.app {
39+
requires org.seasar.doma.core;
40+
requires org.seasar.doma.slf4j;
41+
42+
opens example.app.entity;
43+
}
44+
45+
You can open your module instead of packages:
46+
47+
.. code-block:: java
48+
49+
open module example.app {
50+
requires org.seasar.doma.core;
51+
requires org.seasar.doma.slf4j;
52+
}

0 commit comments

Comments
 (0)