diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2018-09-07 16:15:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-07 16:15:38 -0700 |
commit | f9d8138376765d229a32635c9209061e4e4aed8c (patch) | |
tree | 50719686fd7262f405c9bda8694d6c72e7c038b8 /java/core/src/main/java/com/google/protobuf/Extension.java | |
parent | 2e7563f40ec7f901ae8ae1cc749d701fa07e211d (diff) | |
parent | e53be9bce4556cf0d13e24f1a25a7d75f663144f (diff) | |
download | protobuf-f9d8138376765d229a32635c9209061e4e4aed8c.tar.gz protobuf-f9d8138376765d229a32635c9209061e4e4aed8c.tar.bz2 protobuf-f9d8138376765d229a32635c9209061e4e4aed8c.zip |
Merge pull request #5109 from haberman/integrate
Down-integrate from google3.
Diffstat (limited to 'java/core/src/main/java/com/google/protobuf/Extension.java')
-rw-r--r-- | java/core/src/main/java/com/google/protobuf/Extension.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/java/core/src/main/java/com/google/protobuf/Extension.java b/java/core/src/main/java/com/google/protobuf/Extension.java index 5df12e64..e5da634f 100644 --- a/java/core/src/main/java/com/google/protobuf/Extension.java +++ b/java/core/src/main/java/com/google/protobuf/Extension.java @@ -49,9 +49,7 @@ public abstract class Extension<ContainingType extends MessageLite, Type> // All the methods below are extension implementation details. - /** - * The API type that the extension is used for. - */ + /** The API type that the extension is used for. */ protected enum ExtensionType { IMMUTABLE, MUTABLE, @@ -60,24 +58,25 @@ public abstract class Extension<ContainingType extends MessageLite, Type> protected abstract ExtensionType getExtensionType(); - /** - * Type of a message extension. - */ + /** Type of a message extension. */ public enum MessageType { PROTO1, PROTO2, } /** - * If the extension is a message extension (i.e., getLiteType() == MESSAGE), - * returns the type of the message, otherwise undefined. + * If the extension is a message extension (i.e., getLiteType() == MESSAGE), returns the type of + * the message, otherwise undefined. */ public MessageType getMessageType() { return MessageType.PROTO2; } protected abstract Object fromReflectionType(Object value); + protected abstract Object singularFromReflectionType(Object value); + protected abstract Object toReflectionType(Object value); + protected abstract Object singularToReflectionType(Object value); } |