Class GeneratedMessage.FieldAccessorTable

  • Enclosing class:
    GeneratedMessage

    public static final class GeneratedMessage.FieldAccessorTable
    extends java.lang.Object
    Users should ignore this class. This class provides the implementation with access to the fields of a message object using Java reflection.
    • Constructor Detail

      • FieldAccessorTable

        public FieldAccessorTable​(Descriptors.Descriptor descriptor,
                                  java.lang.String[] camelCaseNames,
                                  java.lang.Class<? extends GeneratedMessage> messageClass,
                                  java.lang.Class<? extends GeneratedMessage.Builder> builderClass)
        Construct a FieldAccessorTable for a particular message class. Only one FieldAccessorTable should ever be constructed per class.
        Parameters:
        descriptor - The type's descriptor.
        camelCaseNames - The camelcase names of all fields in the message. These are used to derive the accessor method names.
        messageClass - The message type.
        builderClass - The builder type.
      • FieldAccessorTable

        public FieldAccessorTable​(Descriptors.Descriptor descriptor,
                                  java.lang.String[] camelCaseNames)
        Construct a FieldAccessorTable for a particular message class without initializing FieldAccessors.
    • Method Detail

      • ensureFieldAccessorsInitialized

        public GeneratedMessage.FieldAccessorTable ensureFieldAccessorsInitialized​(java.lang.Class<? extends GeneratedMessage> messageClass,
                                                                                   java.lang.Class<? extends GeneratedMessage.Builder> builderClass)
        Ensures the field accessors are initialized. This method is thread-safe.
        Parameters:
        messageClass - The message type.
        builderClass - The builder type.
        Returns:
        this