diff options
Diffstat (limited to 'java/src/main/java/com/google/protobuf/Extension.java')
-rw-r--r-- | java/src/main/java/com/google/protobuf/Extension.java | 23 |
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. |