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
Returns
Type
Description

getDescriptor()

  public 
  
 abstract 
  
 Descriptors 
 . 
 FieldDescriptor 
  
 getDescriptor 
 () 
 

Returns the descriptor of the extension.

Returns
Type
Description

getExtensionType()

  protected 
  
 abstract 
  
 Extension 
 . 
 ExtensionType 
  
 getExtensionType 
 () 
 
Returns
Type
Description

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
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

singularFromReflectionType(Object value)

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

singularToReflectionType(Object value)

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

toReflectionType(Object value)

  protected 
  
 abstract 
  
 Object 
  
 toReflectionType 
 ( 
 Object 
  
 value 
 ) 
 
Parameter
Name
Description
value
Returns
Type
Description
Design a Mobile Site
View Site in Mobile | Classic
Share by: