Skip to content

Commit 169045b

Browse files
committed
small readme update
1 parent bb7d1dc commit 169045b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,24 @@ Given an exisiting data class:
4747
For example:
4848

4949
```kotlin
50+
interface SampleInterface
51+
annotation class SampleAnnotation
52+
5053
/**
5154
* Represents a person.
5255
* @property name The full name.
5356
* @property nickname The nickname.
5457
* @property age The age.
5558
*/
5659
@DataCompat
57-
private data class PersonData(val name: String, val nickname: String? = null, val age: Int)
60+
@SampleAnnotation
61+
private data class PersonData(
62+
@Default("\"John\"")
63+
val name: String,
64+
val nickname: String?,
65+
@Default("42")
66+
val age: Int
67+
) : SampleInterface
5868
```
5969

6070
After compilation, the following class will be generated:

0 commit comments

Comments
 (0)