//
//  Generated by the J2ObjC translator.  DO NOT EDIT!
//  source: GeneratedMessageLite.java
//

#include "com/google/protobuf/GeneratedMessageLite.h"
#include "IOSClass.h"
#include "J2ObjC_source.h"
#include "com/google/protobuf/AbstractMessageLite.h"
#include "com/google/protobuf/ExtensionLite.h"
#include "com/google/protobuf/Internal.h"
#include "com/google/protobuf/MessageLite.h"
#include "com/google/protobuf/WireFormat_PackagePrivate.h"
#include "java/lang/IllegalArgumentException.h"

@implementation ComGoogleProtobufGeneratedMessageLite

J2OBJC_IGNORE_DESIGNATED_BEGIN
- (instancetype)init {
  ComGoogleProtobufGeneratedMessageLite_init(self);
  return self;
}
J2OBJC_IGNORE_DESIGNATED_END

@end

void ComGoogleProtobufGeneratedMessageLite_init(ComGoogleProtobufGeneratedMessageLite *self) {
  ComGoogleProtobufAbstractMessageLite_init(self);
}

J2OBJC_CLASS_TYPE_LITERAL_SOURCE(ComGoogleProtobufGeneratedMessageLite)


@implementation ComGoogleProtobufGeneratedMessageLite_GeneratedExtension

- (instancetype)initWithComGoogleProtobufMessageLite:
                    (id<ComGoogleProtobufMessageLite>)containingTypeDefaultInstance
                                                       withId:(id)defaultValue
                             withComGoogleProtobufMessageLite:
                                 (id<ComGoogleProtobufMessageLite>)messageDefaultInstance
withComGoogleProtobufGeneratedMessageLite_ExtensionDescriptor:
    (ComGoogleProtobufGeneratedMessageLite_ExtensionDescriptor *)descriptor
                                                 withIOSClass:(IOSClass *)singularType {
  if (!containingTypeDefaultInstance) {
    @throw create_JavaLangIllegalArgumentException_initWithNSString_(
        @"Null containingTypeDefaultInstance");
  }
  JreStrongAssign(&self->containingTypeDefaultInstance_, containingTypeDefaultInstance);
  JreStrongAssign(&self->defaultValue_, defaultValue);
  JreStrongAssign(&self->messageDefaultInstance_, messageDefaultInstance);
  JreStrongAssign(&self->descriptor_, descriptor);
  return self;
}

- (id<ComGoogleProtobufMessageLite>)getContainingTypeDefaultInstance {
  return containingTypeDefaultInstance_;
}

- (jint)getNumber {
  return [(
      (ComGoogleProtobufGeneratedMessageLite_ExtensionDescriptor *)nil_chk(descriptor_)) getNumber];
}

- (id<ComGoogleProtobufMessageLite>)getMessageDefaultInstance {
  return messageDefaultInstance_;
}

- (ComGoogleProtobufWireFormat_FieldType *)getLiteType {
  return [((ComGoogleProtobufGeneratedMessageLite_ExtensionDescriptor *)nil_chk(
      descriptor_)) getLiteType];
}

- (id)getDefaultValue {
  return defaultValue_;
}

- (jboolean)isRepeated {
  return ((ComGoogleProtobufGeneratedMessageLite_ExtensionDescriptor *)nil_chk(descriptor_))
      ->isRepeated_;
}

- (void)dealloc {
  RELEASE_(containingTypeDefaultInstance_);
  RELEASE_(defaultValue_);
  RELEASE_(messageDefaultInstance_);
  RELEASE_(descriptor_);
  [super dealloc];
}

@end

J2OBJC_CLASS_TYPE_LITERAL_SOURCE(ComGoogleProtobufGeneratedMessageLite_GeneratedExtension)

@implementation ComGoogleProtobufGeneratedMessageLite_ExtensionDescriptor

- (instancetype)initWithComGoogleProtobufInternal_EnumLiteMap:
                    (id<ComGoogleProtobufInternal_EnumLiteMap>)enumTypeMap
                                                      withInt:(jint)number
                    withComGoogleProtobufWireFormat_FieldType:
                        (ComGoogleProtobufWireFormat_FieldType *)type
                                                  withBoolean:(jboolean)isRepeated
                                                  withBoolean:(jboolean)isPacked {
  NSObject_init(self);
  self->number_ = number;
  JreStrongAssign(&self->type_, type);
  self->isRepeated_ = isRepeated;
  self->isPacked_ = isPacked;
  return self;
}

- (jint)getNumber {
  return number_;
}

- (ComGoogleProtobufWireFormat_FieldType *)getLiteType {
  return type_;
}

- (jboolean)isRepeated {
  return isRepeated_;
}

- (jboolean)isPacked {
  return isPacked_;
}

- (void)dealloc {
  RELEASE_(type_);
  [super dealloc];
}

@end

J2OBJC_CLASS_TYPE_LITERAL_SOURCE(ComGoogleProtobufGeneratedMessageLite_ExtensionDescriptor)
