Skip to content

Commit c8213bc

Browse files
rlazokmandrika
authored andcommitted
[Encoders] Improve documentation readability (#8354)
Updated Javadoc comments across multiple modules to replace non-standard abbreviations like "i.e." with clearer alternatives such as "for example" or "that is" for better readability. NO_RELEASE_CHANGE
1 parent 68d5e20 commit c8213bc

4 files changed

Lines changed: 12 additions & 11 deletions

File tree

  • encoders
    • firebase-decoders-json/src/main/java/com/google/firebase/decoders
    • firebase-encoders-processor/src/main/java/com/google/firebase/encoders/processor/getters
    • protoc-gen-firebase-encoders/src/main/kotlin/com/google/firebase/encoders/proto/codegen

encoders/firebase-decoders-json/src/main/java/com/google/firebase/decoders/TypeToken.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
*
2929
* <ol>
3030
* <li>Primitive types
31-
* <li>Array Types: primitive arrays(i.e. {@code int[]}) and object arrays(i.e. {@code Foo[]})
32-
* <li>Plain class types. i.e. {@code Foo}
33-
* <li>Generic types. i.e. {@code Foo<String, Double>}
34-
* <li>Wildcard types: only support {@code Foo<? extend Bar>} by downgrading it to {@code
35-
* Foo<Bar>}, and throw exception when stumbled upon {@code Foo<? super Bar>}.
31+
* <li>Array Types: primitive arrays (like {@code int[]}) and object arrays (like {@code Foo[]})
32+
* <li>Plain class types, for example, {@code Foo}
33+
* <li>Generic types, for example, {@code Foo<String, Double>}
34+
* <li>Wildcard types: only support {@code Foo<? extend Bar>} by downgrading it to
35+
* {@code Foo<Bar>}, and throw exception when stumbled upon {@code Foo<? super Bar>}.
3636
* </ol>
3737
*/
3838
public abstract class TypeToken<T> {
@@ -175,7 +175,7 @@ String getTypeTokenLiteral() {
175175

176176
/**
177177
* {@link ArrayToken} is used to represent Array types in a type-safe manner. such as: primitive
178-
* arrays(i.e. {@code int[]}) and object arrays(i.e. {@code Foo[]})
178+
* arrays (that is, {@code int[]}) and object arrays (that is, {@code Foo[]})
179179
*/
180180
public static class ArrayToken<T> extends TypeToken<T> {
181181
private final TypeToken<?> componentType;

encoders/firebase-encoders-processor/src/main/java/com/google/firebase/encoders/processor/getters/AnnotationProperty.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/** Represents an annotation property/method with its value as explicitly set in source. */
2121
@AutoValue
2222
public abstract class AnnotationProperty {
23-
/** Name of the property, e.g. \"value\". */
23+
/** Name of the property, for example \"value\". */
2424
public abstract String name();
2525

2626
/** Value of the property. */

encoders/firebase-encoders-processor/src/main/java/com/google/firebase/encoders/processor/getters/Getter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public abstract class Getter {
4545
/**
4646
* Getter's underlying Java type.
4747
*
48-
* <p>The type is fully resolved with respect to generics, i.e. {@code Optional<MyType<String>>},
48+
* <p>The type is fully resolved with respect to generics, for example, {@code Optional<MyType<String>>},
4949
* not {@code Optional<T>}.
5050
*/
5151
public TypeMirror getUnderlyingType() {

encoders/protoc-gen-firebase-encoders/src/main/kotlin/com/google/firebase/encoders/proto/codegen/Types.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,19 @@ sealed class Primitive(override val javaName: String, val defaultValue: String)
5555
* Can be one of [Message] or [ProtoEnum].
5656
*/
5757
sealed class UserDefined : ProtobufType() {
58-
/** A fully qualified protobuf message name, i.e. `com.example.Outer.Inner`. */
58+
/** A fully qualified protobuf message name, for example, `com.example.Outer.Inner`. */
5959
abstract val protobufFullName: String
6060

6161
/**
62-
* Specifies the scope that this type is defined in, i.e. a [Owner.Package] or a parent [Message].
62+
* Specifies the scope that this type is defined in, that is, a [Owner.Package] or a parent
63+
* [Message].
6364
*/
6465
abstract val owner: Owner
6566

6667
/** Unqualified name of this type */
6768
abstract val name: String
6869

69-
/** A fully qualified java name of this type, i.e. `com.example.Outer$Inner`. */
70+
/** A fully qualified java name of this type, for example, `com.example.Outer$Inner`. */
7071
override val javaName: String
7172
get() = "${owner.javaName}${owner.scopeSeparator}$name"
7273

0 commit comments

Comments
 (0)