Skip to content

Commit 4fa8417

Browse files
committed
Refine doc on SharedType
1 parent 81ae5f6 commit 4fa8417

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

annotation/src/main/java/org/sharedtype/annotation/SharedType.java

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,23 @@
3535
* Non-static inner classes are not supported.
3636
* </p>
3737
*
38-
* <p>See documentation for details. <a href="https://github.com/cuzfrog/SharedType">SharedType Website</a></p></p>
38+
* <p>
39+
* <b>Generics:</b><br>
40+
* Generics are supported. But it's also limited to target schema's capacity.
41+
* </p>
42+
*
43+
* <p>
44+
* <b>Collections:</b><br>
45+
* Iterables and arrays are treated as arrays. Map is mapped to:
46+
* <ul>
47+
* <li>Typescript: {@code [key: string]: T} where {@code T} can be a reified type.</li>
48+
* </ul>
49+
* </p>
50+
*
51+
* <p><a href="https://github.com/cuzfrog/SharedType">SharedType Website</a></p></p>
3952
*
4053
* @author Cause Chung
54+
* @implNote generics type bounds are not supported yet, Map is not supported yet.
4155
*/
4256
@Retention(RetentionPolicy.SOURCE)
4357
@Target({java.lang.annotation.ElementType.TYPE})
@@ -99,15 +113,13 @@
99113

100114
/**
101115
* Mark enum value. By default, enum value is the enum constant name. The enum value must be literals (e.g. 1, "a", true) in enum constant expressions.
102-
* <br>
103116
* <p>
104117
* When placed on:
105118
* <ul>
106119
* <li>Constructor parameter - the literal value served to this parameter from enum constant expressions will be used.</li>
107120
* <li>Field - the constructor parameter with the same name and type will be used as if constructor parameter is annotated.</li>
108121
* </ul>
109122
* </p>
110-
* <br>
111123
* <p>
112124
* Below are some valid examples:
113125
* </p>
@@ -155,10 +167,10 @@ enum ComponentType {
155167
*/
156168
FIELDS,
157169
/**
158-
* Represents 0 argument non-static methods:
170+
* Represents 0 argument non-static methods that:
159171
* <ul>
160-
* <li>with name same as its instance field. Or fluent getter. This includes record's component accessor.</li>
161-
* <li>starting with a getter prefix. By default, prefixes include 'get' or 'is', which can be configured via global properties.</li>
172+
* <li>have names same as respective instance fields, aka, fluent getter. This includes record's component accessor.</li>
173+
* <li>start with a getter prefix. By default, prefixes include 'get' or 'is', which can be configured via global properties.</li>
162174
* <li>annotated with {@link Accessor}.</li>
163175
* </ul>
164176
*/
@@ -169,6 +181,8 @@ enum ComponentType {
169181
* <li>Class/record static fields with static values.</li>
170182
* </ul>
171183
* Fields with values that cannot be resolved at compile time will not be included. A corresponding warning will be given.
184+
*
185+
* @implNote not implement yet.
172186
*/
173187
CONSTANTS,
174188
}

0 commit comments

Comments
 (0)