Class Type.Builder (3.19.4)

  public 
  
 static 
  
 final 
  
 class 
 Type 
 . 
 Builder 
  
 extends 
  
 GeneratedMessageLite 
 . 
 Builder<Type 
 , 
 Type 
 . 
 Builder 
>  
 implements 
  
 TypeOrBuilder 
 

A protocol buffer message type.

Protobuf type google.protobuf.Type

Implements

TypeOrBuilder

Methods

addAllFields(Iterable<? extends Field> values)

  public 
  
 Type 
 . 
 Builder 
  
 addAllFields 
 ( 
 Iterable 
< ? 
  
 extends 
  
 Field 
>  
 values 
 ) 
 

The list of fields.

repeated .google.protobuf.Field fields = 2;

Parameter
Name
Description
values
Iterable < ? extends com.google.protobuf.Field >
Returns
Type
Description

addAllOneofs(Iterable<String> values)

  public 
  
 Type 
 . 
 Builder 
  
 addAllOneofs 
 ( 
 Iterable<String> 
  
 values 
 ) 
 

The list of types appearing in oneof definitions in this type.

repeated string oneofs = 3;

Parameter
Name
Description
values
Iterable < String >

The oneofs to add.

Returns
Type
Description

This builder for chaining.

addAllOptions(Iterable<? extends Option> values)

  public 
  
 Type 
 . 
 Builder 
  
 addAllOptions 
 ( 
 Iterable 
< ? 
  
 extends 
  
 Option 
>  
 values 
 ) 
 

The protocol buffer options.

repeated .google.protobuf.Option options = 4;

Parameter
Name
Description
values
Iterable < ? extends com.google.protobuf.Option >
Returns
Type
Description

addFields(Field value)

  public 
  
 Type 
 . 
 Builder 
  
 addFields 
 ( 
 Field 
  
 value 
 ) 
 

The list of fields.

repeated .google.protobuf.Field fields = 2;

Parameter
Name
Description
value
Returns
Type
Description

addFields(Field.Builder builderForValue)

  public 
  
 Type 
 . 
 Builder 
  
 addFields 
 ( 
 Field 
 . 
 Builder 
  
 builderForValue 
 ) 
 

The list of fields.

repeated .google.protobuf.Field fields = 2;

Parameter
Name
Description
builderForValue
Returns
Type
Description

addFields(int index, Field value)

  public 
  
 Type 
 . 
 Builder 
  
 addFields 
 ( 
 int 
  
 index 
 , 
  
 Field 
  
 value 
 ) 
 

The list of fields.

repeated .google.protobuf.Field fields = 2;

Parameters
Name
Description
index
int
value
Returns
Type
Description

addFields(int index, Field.Builder builderForValue)

  public 
  
 Type 
 . 
 Builder 
  
 addFields 
 ( 
 int 
  
 index 
 , 
  
 Field 
 . 
 Builder 
  
 builderForValue 
 ) 
 

The list of fields.

repeated .google.protobuf.Field fields = 2;

Parameters
Name
Description
index
int
builderForValue
Returns
Type
Description

addOneofs(String value)

  public 
  
 Type 
 . 
 Builder 
  
 addOneofs 
 ( 
 String 
  
 value 
 ) 
 

The list of types appearing in oneof definitions in this type.

repeated string oneofs = 3;

Parameter
Name
Description
value
String

The oneofs to add.

Returns
Type
Description

This builder for chaining.

addOneofsBytes(ByteString value)

  public 
  
 Type 
 . 
 Builder 
  
 addOneofsBytes 
 ( 
 ByteString 
  
 value 
 ) 
 

The list of types appearing in oneof definitions in this type.

repeated string oneofs = 3;

Parameter
Name
Description
value
ByteString

The bytes of the oneofs to add.

Returns
Type
Description

This builder for chaining.

addOptions(Option value)

  public 
  
 Type 
 . 
 Builder 
  
 addOptions 
 ( 
 Option 
  
 value 
 ) 
 

The protocol buffer options.

repeated .google.protobuf.Option options = 4;

Parameter
Name
Description
value
Returns
Type
Description

addOptions(Option.Builder builderForValue)

  public 
  
 Type 
 . 
 Builder 
  
 addOptions 
 ( 
 Option 
 . 
 Builder 
  
 builderForValue 
 ) 
 

The protocol buffer options.

repeated .google.protobuf.Option options = 4;

Parameter
Name
Description
builderForValue
Returns
Type
Description

addOptions(int index, Option value)

  public 
  
 Type 
 . 
 Builder 
  
 addOptions 
 ( 
 int 
  
 index 
 , 
  
 Option 
  
 value 
 ) 
 

The protocol buffer options.

repeated .google.protobuf.Option options = 4;

Parameters
Name
Description
index
int
value
Returns
Type
Description

addOptions(int index, Option.Builder builderForValue)

  public 
  
 Type 
 . 
 Builder 
  
 addOptions 
 ( 
 int 
  
 index 
 , 
  
 Option 
 . 
 Builder 
  
 builderForValue 
 ) 
 

The protocol buffer options.

repeated .google.protobuf.Option options = 4;

Parameters
Name
Description
index
int
builderForValue
Returns
Type
Description

clearFields()

  public 
  
 Type 
 . 
 Builder 
  
 clearFields 
 () 
 

The list of fields.

repeated .google.protobuf.Field fields = 2;

Returns
Type
Description

clearName()

  public 
  
 Type 
 . 
 Builder 
  
 clearName 
 () 
 

The fully qualified message name.

string name = 1;

Returns
Type
Description

This builder for chaining.

clearOneofs()

  public 
  
 Type 
 . 
 Builder 
  
 clearOneofs 
 () 
 

The list of types appearing in oneof definitions in this type.

repeated string oneofs = 3;

Returns
Type
Description

This builder for chaining.

clearOptions()

  public 
  
 Type 
 . 
 Builder 
  
 clearOptions 
 () 
 

The protocol buffer options.

repeated .google.protobuf.Option options = 4;

Returns
Type
Description

clearSourceContext()

  public 
  
 Type 
 . 
 Builder 
  
 clearSourceContext 
 () 
 

The source context.

.google.protobuf.SourceContext source_context = 5;

Returns
Type
Description

clearSyntax()

  public 
  
 Type 
 . 
 Builder 
  
 clearSyntax 
 () 
 

The source syntax.

.google.protobuf.Syntax syntax = 6;

Returns
Type
Description

This builder for chaining.

getFields(int index)

  public 
  
 Field 
  
 getFields 
 ( 
 int 
  
 index 
 ) 
 

The list of fields.

repeated .google.protobuf.Field fields = 2;

Parameter
Name
Description
index
int
Returns
Type
Description

getFieldsCount()

  public 
  
 int 
  
 getFieldsCount 
 () 
 

The list of fields.

repeated .google.protobuf.Field fields = 2;

Returns
Type
Description
int

getFieldsList()

  public 
  
 List<Field> 
  
 getFieldsList 
 () 
 

The list of fields.

repeated .google.protobuf.Field fields = 2;

Returns
Type
Description
List < Field >

getName()

  public 
  
 String 
  
 getName 
 () 
 

The fully qualified message name.

string name = 1;

Returns
Type
Description

The name.

getNameBytes()

  public 
  
 ByteString 
  
 getNameBytes 
 () 
 

The fully qualified message name.

string name = 1;

Returns
Type
Description

The bytes for name.

getOneofs(int index)

  public 
  
 String 
  
 getOneofs 
 ( 
 int 
  
 index 
 ) 
 

The list of types appearing in oneof definitions in this type.

repeated string oneofs = 3;

Parameter
Name
Description
index
int

The index of the element to return.

Returns
Type
Description

The oneofs at the given index.

getOneofsBytes(int index)

  public 
  
 ByteString 
  
 getOneofsBytes 
 ( 
 int 
  
 index 
 ) 
 

The list of types appearing in oneof definitions in this type.

repeated string oneofs = 3;

Parameter
Name
Description
index
int

The index of the value to return.

Returns
Type
Description

The bytes of the oneofs at the given index.

getOneofsCount()

  public 
  
 int 
  
 getOneofsCount 
 () 
 

The list of types appearing in oneof definitions in this type.

repeated string oneofs = 3;

Returns
Type
Description
int

The count of oneofs.

getOneofsList()

  public 
  
 List<String> 
  
 getOneofsList 
 () 
 

The list of types appearing in oneof definitions in this type.

repeated string oneofs = 3;

Returns
Type
Description
List < String >

A list containing the oneofs.

getOptions(int index)

  public 
  
 Option 
  
 getOptions 
 ( 
 int 
  
 index 
 ) 
 

The protocol buffer options.

repeated .google.protobuf.Option options = 4;

Parameter
Name
Description
index
int
Returns
Type
Description

getOptionsCount()

  public 
  
 int 
  
 getOptionsCount 
 () 
 

The protocol buffer options.

repeated .google.protobuf.Option options = 4;

Returns
Type
Description
int

getOptionsList()

  public 
  
 List<Option> 
  
 getOptionsList 
 () 
 

The protocol buffer options.

repeated .google.protobuf.Option options = 4;

Returns
Type
Description
List < Option >

getSourceContext()

  public 
  
 SourceContext 
  
 getSourceContext 
 () 
 

The source context.

.google.protobuf.SourceContext source_context = 5;

Returns
Type
Description

getSyntax()

  public 
  
 Syntax 
  
 getSyntax 
 () 
 

The source syntax.

.google.protobuf.Syntax syntax = 6;

Returns
Type
Description

The syntax.

getSyntaxValue()

  public 
  
 int 
  
 getSyntaxValue 
 () 
 

The source syntax.

.google.protobuf.Syntax syntax = 6;

Returns
Type
Description
int

The enum numeric value on the wire for syntax.

hasSourceContext()

  public 
  
 boolean 
  
 hasSourceContext 
 () 
 

The source context.

.google.protobuf.SourceContext source_context = 5;

Returns
Type
Description

mergeSourceContext(SourceContext value)

  public 
  
 Type 
 . 
 Builder 
  
 mergeSourceContext 
 ( 
 SourceContext 
  
 value 
 ) 
 

The source context.

.google.protobuf.SourceContext source_context = 5;

Parameter
Name
Description
Returns
Type
Description

removeFields(int index)

  public 
  
 Type 
 . 
 Builder 
  
 removeFields 
 ( 
 int 
  
 index 
 ) 
 

The list of fields.

repeated .google.protobuf.Field fields = 2;

Parameter
Name
Description
index
int
Returns
Type
Description

removeOptions(int index)

  public 
  
 Type 
 . 
 Builder 
  
 removeOptions 
 ( 
 int 
  
 index 
 ) 
 

The protocol buffer options.

repeated .google.protobuf.Option options = 4;

Parameter
Name
Description
index
int
Returns
Type
Description

setFields(int index, Field value)

  public 
  
 Type 
 . 
 Builder 
  
 setFields 
 ( 
 int 
  
 index 
 , 
  
 Field 
  
 value 
 ) 
 

The list of fields.

repeated .google.protobuf.Field fields = 2;

Parameters
Name
Description
index
int
value
Returns
Type
Description

setFields(int index, Field.Builder builderForValue)

  public 
  
 Type 
 . 
 Builder 
  
 setFields 
 ( 
 int 
  
 index 
 , 
  
 Field 
 . 
 Builder 
  
 builderForValue 
 ) 
 

The list of fields.

repeated .google.protobuf.Field fields = 2;

Parameters
Name
Description
index
int
builderForValue
Returns
Type
Description

setName(String value)

  public 
  
 Type 
 . 
 Builder 
  
 setName 
 ( 
 String 
  
 value 
 ) 
 

The fully qualified message name.

string name = 1;

Parameter
Name
Description
value
String

The name to set.

Returns
Type
Description

This builder for chaining.

setNameBytes(ByteString value)

  public 
  
 Type 
 . 
 Builder 
  
 setNameBytes 
 ( 
 ByteString 
  
 value 
 ) 
 

The fully qualified message name.

string name = 1;

Parameter
Name
Description
value
ByteString

The bytes for name to set.

Returns
Type
Description

This builder for chaining.

setOneofs(int index, String value)

  public 
  
 Type 
 . 
 Builder 
  
 setOneofs 
 ( 
 int 
  
 index 
 , 
  
 String 
  
 value 
 ) 
 

The list of types appearing in oneof definitions in this type.

repeated string oneofs = 3;

Parameters
Name
Description
index
int

The index to set the value at.

value
String

The oneofs to set.

Returns
Type
Description

This builder for chaining.

setOptions(int index, Option value)

  public 
  
 Type 
 . 
 Builder 
  
 setOptions 
 ( 
 int 
  
 index 
 , 
  
 Option 
  
 value 
 ) 
 

The protocol buffer options.

repeated .google.protobuf.Option options = 4;

Parameters
Name
Description
index
int
value
Returns
Type
Description

setOptions(int index, Option.Builder builderForValue)

  public 
  
 Type 
 . 
 Builder 
  
 setOptions 
 ( 
 int 
  
 index 
 , 
  
 Option 
 . 
 Builder 
  
 builderForValue 
 ) 
 

The protocol buffer options.

repeated .google.protobuf.Option options = 4;

Parameters
Name
Description
index
int
builderForValue
Returns
Type
Description

setSourceContext(SourceContext value)

  public 
  
 Type 
 . 
 Builder 
  
 setSourceContext 
 ( 
 SourceContext 
  
 value 
 ) 
 

The source context.

.google.protobuf.SourceContext source_context = 5;

Parameter
Name
Description
Returns
Type
Description

setSourceContext(SourceContext.Builder builderForValue)

  public 
  
 Type 
 . 
 Builder 
  
 setSourceContext 
 ( 
 SourceContext 
 . 
 Builder 
  
 builderForValue 
 ) 
 

The source context.

.google.protobuf.SourceContext source_context = 5;

Parameter
Name
Description
builderForValue
Returns
Type
Description

setSyntax(Syntax value)

  public 
  
 Type 
 . 
 Builder 
  
 setSyntax 
 ( 
 Syntax 
  
 value 
 ) 
 

The source syntax.

.google.protobuf.Syntax syntax = 6;

Parameter
Name
Description
value
Syntax

The enum numeric value on the wire for syntax to set.

Returns
Type
Description

This builder for chaining.

setSyntaxValue(int value)

  public 
  
 Type 
 . 
 Builder 
  
 setSyntaxValue 
 ( 
 int 
  
 value 
 ) 
 

The source syntax.

.google.protobuf.Syntax syntax = 6;

Parameter
Name
Description
value
int

The syntax to set.

Returns
Type
Description

This builder for chaining.

Design a Mobile Site
View Site in Mobile | Classic
Share by: