public abstract class Extension<ContainingType extends MessageLiteextends Object ,Type>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
Extension
The API type that the extension is used for.
|
static class |
Extension
Type of a message extension.
|
| Constructor and Description |
|---|
Extension()
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract Object |
fromReflectionType(Object
|
abstract Type |
getDefaultValue()
Returns the default value of the extension field.
|
abstract Descriptors |
getDescriptor()
Returns the descriptor of the extension.
|
protected Extension |
getExtensionType()
|
abstract WireFormat |
getLiteType()
Returns the type of the field.
|
abstract MessageLite |
getMessageDefaultInstance()
Returns the default instance of the extension field, if it's a message extension.
|
Extension |
getMessageType()
If the extension is a message extension (i.e., getLiteType() == MESSAGE), returns the type of the message, otherwise undefined.
|
abstract int |
getNumber()
Returns the field number of the extension.
|
abstract boolean |
isRepeated()
Returns whether it is a repeated field.
|
protected abstract Object |
singularFromReflectionType(Object
|
protected abstract Object |
singularToReflectionType(Object
|
protected abstract Object |
toReflectionType(Object
|
public abstract int getNumber()
public abstract WireFormat.FieldType getLiteType()
public abstract boolean isRepeated()
public abstract Descriptors.FieldDescriptor getDescriptor()
public abstract Type getDefaultValue()
public abstract MessageLitegetMessageDefaultInstance()
protected Extension.ExtensionType getExtensionType()
public Extension.MessageType getMessageType()