public void add ( final FieldDescriptor type ) { if ( type . getJavaType ( ) == FieldDescriptor . JavaType . MESSAGE ) { throw new IllegalArgumentException ( "ExtensionRegistry.add() must be provided a default instance when " + "adding an embedded message extension." ) ; } add ( new ExtensionInfo ( type , null ) ) ; }
Add a non - message - type extension to the registry by descriptor .