aboutsummaryrefslogtreecommitdiff
path: root/java/core/src/main/java/com/google/protobuf/Extension.java
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2018-09-07 16:15:38 -0700
committerGitHub <noreply@github.com>2018-09-07 16:15:38 -0700
commitf9d8138376765d229a32635c9209061e4e4aed8c (patch)
tree50719686fd7262f405c9bda8694d6c72e7c038b8 /java/core/src/main/java/com/google/protobuf/Extension.java
parent2e7563f40ec7f901ae8ae1cc749d701fa07e211d (diff)
parente53be9bce4556cf0d13e24f1a25a7d75f663144f (diff)
downloadprotobuf-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.java15
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);
}