|
25 | 25 | * with a server-generated timestamp. |
26 | 26 | * |
27 | 27 | * <h3>Kotlin Note</h3> |
28 | | - * When applying this annotation to a property of a Kotlin class, the <code>@get</code> use-site |
29 | | - * target should always be used. There is no need to use the <code>@set</code> use-site target as |
30 | | - * this annotation is <em>only</em> considered when <em>writing</em> instances into Firestore, and |
31 | | - * is ignored when <em>reading</em> instances from Firestore. |
| 28 | + * When applying this annotation to a property of a Kotlin class, the {@code @get} use-site target |
| 29 | + * should always be used. There is no need to use the {@code @set} use-site target as this |
| 30 | + * annotation is <em>only</em> considered when <em>writing</em> instances into Firestore, and is |
| 31 | + * ignored when <em>reading</em> instances from Firestore. |
32 | 32 | * <p> |
33 | 33 | * Here is an example of a class that can both be written into and read from Firestore whose |
34 | | - * <code>foo</code> property will be populated with the server timestamp in Firestore if its value |
35 | | - * is null: |
| 34 | + * {@code foo} property will be populated with the server timestamp in Firestore if its value is |
| 35 | + * null: |
36 | 36 | * <pre> |
37 | 37 | * data class Pojo(@get:ServerTimestamp var foo: Timestamp? = null) { |
38 | 38 | * constructor() : this(null) // Used by Firestore to create new instances |
|
44 | 44 | * <pre> |
45 | 45 | * data class Pojo(@get:ServerTimestamp val foo: Timestamp? = null) |
46 | 46 | * </pre> |
47 | | - * That is, <code>var</code> can be tightened to <code>val</code> and the secondary no-argument |
48 | | - * constructor can be omitted. |
| 47 | + * That is, {@code var} can be tightened to {@code val} and the secondary no-argument constructor |
| 48 | + * can be omitted. |
49 | 49 | */ |
50 | 50 | @Retention(RetentionPolicy.RUNTIME) |
51 | 51 | @Target({ElementType.METHOD, ElementType.FIELD}) |
|
0 commit comments