Class GeneratedMessage.FieldAccessorTable

Stay organized with collections Save and categorize content based on your preferences.
public static final class GeneratedMessage.FieldAccessorTable

Users should ignore this class. This class provides the implementation with access to the fields of a message object using Java reflection.

Inheritance

java.lang.Object > GeneratedMessage.FieldAccessorTable

Constructors

FieldAccessorTable(Descriptors.Descriptor descriptor, String[] camelCaseNames)

public FieldAccessorTable(Descriptors.Descriptor descriptor, String[] camelCaseNames)

Construct a FieldAccessorTable for a particular message class without initializing FieldAccessors.

Parameters
NameDescription
descriptorDescriptors.Descriptor
camelCaseNamesString[]

FieldAccessorTable(Descriptors.Descriptor descriptor, String[] camelCaseNames, Class<? extends GeneratedMessage> messageClass, Class<? extends GeneratedMessage.Builder> builderClass)

public FieldAccessorTable(Descriptors.Descriptor descriptor, String[] camelCaseNames, Class<? extends GeneratedMessage> messageClass, Class<? extends GeneratedMessage.Builder> builderClass)

Construct a FieldAccessorTable for a particular message class. Only one FieldAccessorTable should ever be constructed per class.

Parameters
NameDescription
descriptorDescriptors.Descriptor

The type's descriptor.

camelCaseNamesString[]

The camelcase names of all fields in the message. These are used to derive the accessor method names.

messageClassClass<? extends com.google.protobuf.GeneratedMessage>

The message type.

builderClassClass<? extends com.google.protobuf.GeneratedMessage.Builder>

The builder type.

Methods

ensureFieldAccessorsInitialized(Class<? extends GeneratedMessage> messageClass, Class<? extends GeneratedMessage.Builder> builderClass)

public GeneratedMessage.FieldAccessorTable ensureFieldAccessorsInitialized(Class<? extends GeneratedMessage> messageClass, Class<? extends GeneratedMessage.Builder> builderClass)

Ensures the field accessors are initialized. This method is thread-safe.

Parameters
NameDescription
messageClassClass<? extends com.google.protobuf.GeneratedMessage>

The message type.

builderClassClass<? extends com.google.protobuf.GeneratedMessage.Builder>

The builder type.

Returns
TypeDescription
GeneratedMessage.FieldAccessorTable

this