aboutsummaryrefslogtreecommitdiff
path: root/java/src/main/java/com/google/protobuf/Extension.java
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2014-11-10 17:34:54 -0800
committerFeng Xiao <xfxyjwf@gmail.com>2014-11-10 17:34:54 -0800
commit6ef984af4b0c63c1c33127a12dcfc8e6359f0c9e (patch)
treed17c61ff9f3ae28224fbddac6d26bfc59e2cf755 /java/src/main/java/com/google/protobuf/Extension.java
parentbaca1a8a1aa180c42de6278d3b8286c4496c6a10 (diff)
downloadprotobuf-6ef984af4b0c63c1c33127a12dcfc8e6359f0c9e.tar.gz
protobuf-6ef984af4b0c63c1c33127a12dcfc8e6359f0c9e.tar.bz2
protobuf-6ef984af4b0c63c1c33127a12dcfc8e6359f0c9e.zip
Down-integrate from internal code base.
Diffstat (limited to 'java/src/main/java/com/google/protobuf/Extension.java')
-rw-r--r--java/src/main/java/com/google/protobuf/Extension.java23
1 files changed, 6 insertions, 17 deletions
diff --git a/java/src/main/java/com/google/protobuf/Extension.java b/java/src/main/java/com/google/protobuf/Extension.java
index 0baa22b3..68d29f33 100644
--- a/java/src/main/java/com/google/protobuf/Extension.java
+++ b/java/src/main/java/com/google/protobuf/Extension.java
@@ -35,27 +35,16 @@ package com.google.protobuf;
*
* @author liujisi@google.com (Jisi Liu)
*/
-public abstract class Extension<ContainingType extends MessageLite, Type> {
- /** Returns the field number of the extension. */
- public abstract int getNumber();
-
- /** Returns the type of the field. */
- public abstract WireFormat.FieldType getLiteType();
-
- /** Returns whether it is a repeated field. */
- public abstract boolean isRepeated();
+public abstract class Extension<ContainingType extends MessageLite, Type>
+ extends ExtensionLite<ContainingType, Type> {
/** Returns the descriptor of the extension. */
public abstract Descriptors.FieldDescriptor getDescriptor();
- /** Returns the default value of the extension field. */
- public abstract Type getDefaultValue();
-
- /**
- * Returns the default instance of the extension field, if it's a message
- * extension.
- */
- public abstract MessageLite getMessageDefaultInstance();
+ /** Returns whether or not this extension is a Lite Extension. */
+ final boolean isLite() {
+ return false;
+ }
// All the methods below are extension implementation details.