[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Class Extension<ContainingType,Type> (3.19.4)\n\n public abstract class Extension\u003cContainingType,Type\u003e extends ExtensionLite\u003cContainingType,Type\u003e\n\nInterface that generated extensions implement. \n\nInheritance\n-----------\n\n[Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e [ExtensionLite](/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite) \\\u003e Extension\\\u003cContainingType,Type\\\u003e \n\nInherited Members\n-----------------\n\n[ExtensionLite.getDefaultValue()](/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite#com_google_protobuf_ExtensionLite_getDefaultValue__) \n[ExtensionLite.getLiteType()](/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite#com_google_protobuf_ExtensionLite_getLiteType__) \n[ExtensionLite.getMessageDefaultInstance()](/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite#com_google_protobuf_ExtensionLite_getMessageDefaultInstance__) \n[ExtensionLite.getNumber()](/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite#com_google_protobuf_ExtensionLite_getNumber__) \n[ExtensionLite.isRepeated()](/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite#com_google_protobuf_ExtensionLite_isRepeated__) \n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nConstructors\n------------\n\n### Extension()\n\n public Extension()\n\nMethods\n-------\n\n### fromReflectionType(Object value)\n\n protected abstract Object fromReflectionType(Object value)\n\n### getDescriptor()\n\n public abstract Descriptors.FieldDescriptor getDescriptor()\n\nReturns the descriptor of the extension.\n\n### getExtensionType()\n\n protected abstract Extension.ExtensionType getExtensionType()\n\n### getMessageDefaultInstance()\n\n public abstract Message getMessageDefaultInstance()\n\nReturns the default instance of the extension field, if it's a message extension. Overridden to return [Message](/java/docs/reference/protobuf/latest/com.google.protobuf.Message) instead of [MessageLite](/java/docs/reference/protobuf/latest/com.google.protobuf.MessageLite).\n\n**Overrides** \n[ExtensionLite\\\u003cContainingType,Type\\\u003e.getMessageDefaultInstance()](/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionLite#com_google_protobuf_ExtensionLite_getMessageDefaultInstance__)\n\n### getMessageType()\n\n public Extension.MessageType getMessageType()\n\nIf the extension is a message extension (i.e., getLiteType() == MESSAGE), returns the type of\nthe message, otherwise undefined.\n\n### singularFromReflectionType(Object value)\n\n protected abstract Object singularFromReflectionType(Object value)\n\n### singularToReflectionType(Object value)\n\n protected abstract Object singularToReflectionType(Object value)\n\n### toReflectionType(Object value)\n\n protected abstract Object toReflectionType(Object value)"]]