Skip to content

Commit 2845a94

Browse files
committed
PropertyName.java: fix rendering of code sample
1 parent 3a6018b commit 2845a94

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

firebase-firestore/src/main/java/com/google/firebase/firestore/PropertyName.java

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,25 @@
2323
* Marks a field to be renamed when serialized.
2424
*
2525
* <h3>Kotlin Note</h3>
26-
* When applying this annotation to a property of a Kotlin class, both the <code>@get</code> and
27-
* <code>@set</code> use-site targets should be used.
26+
* When applying this annotation to a property of a Kotlin class, both the {@code @get} and
27+
* {@code @set} use-site targets should be used.
2828
* <p>
2929
* Here is an example of a class that can both be written into and read from Firestore whose
30-
* <code>foo</code> property will be stored into and read from a field named "my_foo" in the
30+
* {@code foo} property will be stored into and read from a field named {@code my_foo} in the
3131
* Firestore document:
3232
* <pre>
33-
* data class Pojo(
34-
* @get:PropertyName("my_foo")
35-
* @set:PropertyName("my_foo")
36-
* var foo: String? = null
37-
* ) {
33+
* data class Pojo(@get:PropertyName("my_foo") @set:PropertyName("my_foo") var foo: String? = null) {
3834
* constructor() : this(null) // Used by Firestore to create new instances
3935
* }
4036
* </pre>
4137
* <p>
4238
* If the class only needs to be <em>written</em> into Firestore (and not read from Firestore) then
4339
* the class can be simplified as follows:
4440
* <pre>
45-
* data class Pojo(@get:PropertyName("my_foo") val foo: String? = null)
41+
* {@literal data class Pojo(@get:PropertyName("my_foo") val foo: String? = null)}
4642
* </pre>
47-
* That is, <code>var</code> can be tightened to <code>val</code>, the secondary no-argument
48-
* constructor can be omitted, and the <code>@set</code> use-site target can be omitted.
43+
* That is, {@code var} can be tightened to {@code val}, the secondary no-argument constructor can
44+
* be omitted, and the {@code @set} use-site target can be omitted.
4945
*/
5046
@Retention(RetentionPolicy.RUNTIME)
5147
@Target({ElementType.METHOD, ElementType.FIELD})

0 commit comments

Comments
 (0)