Class Extension<ContainingType,Type> (3.19.4)

public abstract class Extension<ContainingType,Type> extends ExtensionLite<ContainingType,Type>

Interface that generated extensions implement.

Inheritance

Object > ExtensionLite > Extension<ContainingType,Type>

Type Parameters

Name Description
ContainingType
Type

Constructors

Extension()

public Extension()

Methods

fromReflectionType(Object value)

protected abstract Object fromReflectionType(Object value)
Parameter
Name Description
value Object
Returns
Type Description
Object

getDescriptor()

public abstract Descriptors.FieldDescriptor getDescriptor()

Returns the descriptor of the extension.

Returns
Type Description
Descriptors.FieldDescriptor

getExtensionType()

protected abstract Extension.ExtensionType getExtensionType()
Returns
Type Description
Extension.ExtensionType

getMessageDefaultInstance()

public abstract Message getMessageDefaultInstance()

Returns the default instance of the extension field, if it's a message extension. Overridden to return Message instead of MessageLite.

Returns
Type Description
Message
Overrides

getMessageType()

public Extension.MessageType getMessageType()

If the extension is a message extension (i.e., getLiteType() == MESSAGE), returns the type of the message, otherwise undefined.

Returns
Type Description
Extension.MessageType

singularFromReflectionType(Object value)

protected abstract Object singularFromReflectionType(Object value)
Parameter
Name Description
value Object
Returns
Type Description
Object

singularToReflectionType(Object value)

protected abstract Object singularToReflectionType(Object value)
Parameter
Name Description
value Object
Returns
Type Description
Object

toReflectionType(Object value)

protected abstract Object toReflectionType(Object value)
Parameter
Name Description
value Object
Returns
Type Description
Object