# Class GeneratedMessageLite.GeneratedExtension&lt;ContainingType,Type&gt; (3.19.4)

    public static class GeneratedMessageLite.GeneratedExtension<ContainingType,Type> extends ExtensionLite<ContainingType,Type>

Lite equivalent to [GeneratedMessage.GeneratedExtension](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.GeneratedExtension).

Users should ignore the contents of this class and only use objects of this type as
parameters to extension accessors and ExtensionRegistry.add().

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> [ExtensionLite](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite) \> GeneratedMessageLite.GeneratedExtension\<ContainingType,Type\>

## Inherited Members

[ExtensionLite.getDefaultValue()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite#com_google_protobuf_ExtensionLite_getDefaultValue__) [ExtensionLite.getLiteType()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite#com_google_protobuf_ExtensionLite_getLiteType__) [ExtensionLite.getMessageDefaultInstance()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite#com_google_protobuf_ExtensionLite_getMessageDefaultInstance__) [ExtensionLite.getNumber()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite#com_google_protobuf_ExtensionLite_getNumber__) [ExtensionLite.isRepeated()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite#com_google_protobuf_ExtensionLite_isRepeated__) [Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

| ## Type Parameters ||
|---|---|
| **Name** | **Description** |
| `ContainingType` |   |
| `Type` |   |

## Methods

### getContainingTypeDefaultInstance()

    public ContainingType getContainingTypeDefaultInstance()

Default instance of the type being extended, used to identify that type.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ContainingType` |   |

### getDefaultValue()

    public Type getDefaultValue()

Returns the default value of the extension field.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Type` |   |

**Overrides** [ExtensionLite\<ContainingType,Type\>.getDefaultValue()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite#com_google_protobuf_ExtensionLite_getDefaultValue__)

### getLiteType()

    public WireFormat.FieldType getLiteType()

Returns the type of the field.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.WireFormat.FieldType` |   |

**Overrides** [ExtensionLite\<ContainingType,Type\>.getLiteType()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite#com_google_protobuf_ExtensionLite_getLiteType__)

### getMessageDefaultInstance()

    public MessageLite getMessageDefaultInstance()

If the extension is an embedded message or group, returns the default instance of the
message.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageLite` |   |

**Overrides** [ExtensionLite\<ContainingType,Type\>.getMessageDefaultInstance()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite#com_google_protobuf_ExtensionLite_getMessageDefaultInstance__)

### getNumber()

    public int getNumber()

Get the field number.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

**Overrides** [ExtensionLite\<ContainingType,Type\>.getNumber()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite#com_google_protobuf_ExtensionLite_getNumber__)

### isRepeated()

    public boolean isRepeated()

Returns whether it is a repeated field.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

**Overrides** [ExtensionLite\<ContainingType,Type\>.isRepeated()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite#com_google_protobuf_ExtensionLite_isRepeated__)