@JRubyMethod public IRubyObject initialize(ThreadContext context, IRubyObject enumDescriptor) { this.enumDescriptor = (RubyEnumDescriptor) enumDescriptor; return this; }
@JRubyMethod(meta = true, name = "generated_pool") public static IRubyObject generatedPool(ThreadContext context, IRubyObject recv) { return descriptorPool; }
@JRubyMethod(name = "name") public IRubyObject getName(ThreadContext context) { return this.name; }
@JRubyMethod(name = "number") public IRubyObject getnumber(ThreadContext context) { return this.number; }
@JRubyMethod(name = {"to_ary", "to_a"}) public IRubyObject toArray(ThreadContext context) { return this.storage; }
@JRubyMethod(name = "name") public IRubyObject getName(ThreadContext context) { return name; }
@JRubyMethod(name = "label") public IRubyObject getLabel(ThreadContext context) { return this.label; }
@JRubyMethod(name = "name") public IRubyObject getName(ThreadContext context) { return this.name; }
@JRubyMethod(name = "name") public IRubyObject getName(ThreadContext context) { return this.name; }
@JRubyMethod(name = "subtype") public IRubyObject getSubType(ThreadContext context) { return subType; }
@JRubyMethod public IRubyObject clear(ThreadContext context) { this.storage.clear(); return this.storage; }
@JRubyMethod public IRubyObject each(ThreadContext context, Block block) { this.storage.each(context, block); return this.storage; }
@JRubyMethod public IRubyObject initialize(ThreadContext context) { builder = DescriptorProtos.FieldDescriptorProto.newBuilder(); return this; }
@JRubyMethod public IRubyObject enummodule(ThreadContext context) { if (this.klazz == null) { this.klazz = buildModuleFromDescriptor(context); } return this.klazz; }
@JRubyMethod public IRubyObject msgclass(ThreadContext context) { if (this.klazz == null) { this.klazz = buildClassFromDescriptor(context); } return this.klazz; }
@JRubyMethod(meta = true, name = "descriptor") public static IRubyObject getDescriptor(ThreadContext context, IRubyObject recv) { return ((RubyModule) recv).getInstanceVariable(Utils.DESCRIPTOR_INSTANCE_VAR); } }
@JRubyMethod(name = "[]=") public IRubyObject indexSet(ThreadContext context, IRubyObject fieldName, IRubyObject value) { Descriptors.FieldDescriptor fieldDescriptor = findField(context, fieldName); return setField(context, fieldDescriptor, value); }
@JRubyMethod(visibility = org.jruby.runtime.Visibility.PRIVATE) public IRubyObject pop_one(ThreadContext context) { IRubyObject ret = this.storage.last(); this.storage.remove(ret); return ret; }
@JRubyMethod(name = "[]") public IRubyObject index(ThreadContext context, IRubyObject fieldName) { Descriptors.FieldDescriptor fieldDescriptor = findField(context, fieldName); return getField(context, fieldDescriptor); }
@JRubyMethod public IRubyObject initialize(ThreadContext context, IRubyObject descriptor, IRubyObject rubyBuilder) { this.cFieldDescriptor = (RubyClass) context.runtime.getClassFromPath("Google::Protobuf::FieldDescriptor"); this.cDescriptor = (RubyClass) context.runtime.getClassFromPath("Google::Protobuf::Descriptor"); this.cOneofDescriptor = (RubyClass) context.runtime.getClassFromPath("Google::Protobuf::OneofDescriptor"); this.cOneofBuilderContext = (RubyClass) context.runtime.getClassFromPath("Google::Protobuf::Internal::OneofBuilderContext"); this.descriptor = (RubyDescriptor) descriptor; this.builder = (RubyBuilder) rubyBuilder; return this; }