Refine search
public static void createRubyFileDescriptor(Ruby runtime) { RubyModule mProtobuf = runtime.getClassFromPath("Google::Protobuf"); RubyClass cFieldDescriptor = mProtobuf.defineClassUnder("FieldDescriptor", runtime.getObject(), new ObjectAllocator() { @Override public IRubyObject allocate(Ruby runtime, RubyClass klazz) { return new RubyFieldDescriptor(runtime, klazz); } }); cFieldDescriptor.defineAnnotatedMethods(RubyFieldDescriptor.class); }
public static RubyClass createArrayJavaProxyCreator(ThreadContext context) { Ruby runtime = context.runtime; RubyClass arrayJavaProxyCreator = runtime.defineClass("ArrayJavaProxyCreator", runtime.getObject(), ObjectAllocator.NOT_ALLOCATABLE_ALLOCATOR); arrayJavaProxyCreator.defineAnnotatedMethods(ArrayJavaProxyCreator.class); return arrayJavaProxyCreator; }
public static RubyClass createJRubyObjectInputStream(Ruby runtime) { RubyClass result = runtime.defineClass("JRubyObjectInputStream",runtime.getObject(), ALLOCATOR); result.defineAnnotatedMethods(JRubyObjectInputStream.class); return result; }
public static void createRubyEnumBuilderContext(Ruby runtime) { RubyModule protobuf = runtime.getClassFromPath("Google::Protobuf"); RubyClass cMessageBuilderContext = protobuf.defineClassUnder("EnumBuilderContext", runtime.getObject(), new ObjectAllocator() { @Override public IRubyObject allocate(Ruby runtime, RubyClass klazz) { return new RubyEnumBuilderContext(runtime, klazz); } }); cMessageBuilderContext.defineAnnotatedMethods(RubyEnumBuilderContext.class); }
public static void createTracePointClass(Ruby runtime) { RubyClass tracePoint = runtime.defineClass("TracePoint", runtime.getObject(), new ObjectAllocator() { @Override public IRubyObject allocate(Ruby runtime, RubyClass klazz) { return new TracePoint(runtime, klazz); } }); tracePoint.defineAnnotatedMethods(TracePoint.class); }
public static void createRubyMessageBuilderContext(Ruby runtime) { RubyModule protobuf = runtime.getClassFromPath("Google::Protobuf"); RubyClass cMessageBuilderContext = protobuf.defineClassUnder("MessageBuilderContext", runtime.getObject(), new ObjectAllocator() { @Override public IRubyObject allocate(Ruby runtime, RubyClass klazz) { return new RubyMessageBuilderContext(runtime, klazz); } }); cMessageBuilderContext.defineAnnotatedMethods(RubyMessageBuilderContext.class); }
public static RubyClass createArrayJavaProxyCreator(ThreadContext context) { Ruby runtime = context.runtime; RubyClass arrayJavaProxyCreator = runtime.defineClass("ArrayJavaProxyCreator", runtime.getObject(), ObjectAllocator.NOT_ALLOCATABLE_ALLOCATOR); arrayJavaProxyCreator.defineAnnotatedMethods(ArrayJavaProxyCreator.class); return arrayJavaProxyCreator; }
public static void createRubyBuilder(Ruby runtime) { RubyModule protobuf = runtime.getClassFromPath("Google::Protobuf"); RubyClass cBuilder = protobuf.defineClassUnder("Builder", runtime.getObject(), new ObjectAllocator() { @Override public IRubyObject allocate(Ruby runtime, RubyClass klazz) { return new RubyBuilder(runtime, klazz); } }); cBuilder.defineAnnotatedMethods(RubyBuilder.class); }
public void load(final Ruby runtime, boolean wrap) { RubyClass cFiber = runtime.defineClass("Fiber", runtime.getObject(), new ObjectAllocator() { public IRubyObject allocate(Ruby runtime, RubyClass klazz) { return new ThreadFiber(runtime, klazz); } }); cFiber.defineAnnotatedMethods(ThreadFiber.class); } }
public static void createRubyOneofBuilderContext(Ruby runtime) { RubyModule protobuf = runtime.getClassFromPath("Google::Protobuf"); RubyModule internal = protobuf.defineModuleUnder("Internal"); RubyClass cRubyOneofBuidlerContext = internal.defineClassUnder("OneofBuilderContext", runtime.getObject(), new ObjectAllocator() { @Override public IRubyObject allocate(Ruby ruby, RubyClass rubyClass) { return new RubyOneofBuilderContext(ruby, rubyClass); } }); cRubyOneofBuidlerContext.defineAnnotatedMethods(RubyOneofBuilderContext.class); }
public static void init(Ruby ruby) { RubyClass mm = ruby.defineClass("MethodMissing", ruby.getObject(), new ObjectAllocator() { public IRubyObject allocate(Ruby runtime, RubyClass klazz) { return new MethodMissing(runtime, klazz); } }); mm.defineAnnotatedMethods(MethodMissing.class); }
public static void createRubyDescriptor(Ruby runtime) { RubyModule protobuf = runtime.getClassFromPath("Google::Protobuf"); RubyClass cDescriptor = protobuf.defineClassUnder("Descriptor", runtime.getObject(), new ObjectAllocator() { @Override public IRubyObject allocate(Ruby runtime, RubyClass klazz) { return new RubyDescriptor(runtime, klazz); } }); cDescriptor.includeModule(runtime.getEnumerable()); cDescriptor.defineAnnotatedMethods(RubyDescriptor.class); }
public static void createTracePointClass(Ruby runtime) { RubyClass tracePoint = runtime.defineClass("TracePoint", runtime.getObject(), new ObjectAllocator() { @Override public IRubyObject allocate(Ruby runtime, RubyClass klazz) { return new TracePoint(runtime, klazz); } }); tracePoint.defineAnnotatedMethods(TracePoint.class); }
public static void createRubyEnumDescriptor(Ruby runtime) { RubyModule mProtobuf = runtime.getClassFromPath("Google::Protobuf"); RubyClass cEnumDescriptor = mProtobuf.defineClassUnder("EnumDescriptor", runtime.getObject(), new ObjectAllocator() { @Override public IRubyObject allocate(Ruby runtime, RubyClass klazz) { return new RubyEnumDescriptor(runtime, klazz); } }); cEnumDescriptor.includeModule(runtime.getEnumerable()); cEnumDescriptor.defineAnnotatedMethods(RubyEnumDescriptor.class); }
public static RubyClass createJRubyObjectInputStream(Ruby runtime) { RubyClass result = runtime.defineClass("JRubyObjectInputStream",runtime.getObject(),JROIS_ALLOCATOR); result.defineAnnotatedMethods(JRubyObjectInputStream.class); return result; }
public static void createRubyDescriptorPool(Ruby runtime) { RubyModule protobuf = runtime.getClassFromPath("Google::Protobuf"); RubyClass cDescriptorPool = protobuf.defineClassUnder("DescriptorPool", runtime.getObject(), new ObjectAllocator() { @Override public IRubyObject allocate(Ruby runtime, RubyClass klazz) { return new RubyDescriptorPool(runtime, klazz); } }); cDescriptorPool.defineAnnotatedMethods(RubyDescriptorPool.class); descriptorPool = (RubyDescriptorPool) cDescriptorPool.newInstance(runtime.getCurrentContext(), Block.NULL_BLOCK); }
public static void createTracePointClass(Ruby runtime) { RubyClass tracePoint = runtime.defineClass("TracePoint", runtime.getObject(), new ObjectAllocator() { @Override public IRubyObject allocate(Ruby runtime, RubyClass klazz) { return new TracePoint(runtime, klazz); } }); tracePoint.defineAnnotatedMethods(TracePoint.class); }
public static void createRubyOneofDescriptor(Ruby runtime) { RubyModule protobuf = runtime.getClassFromPath("Google::Protobuf"); RubyClass cRubyOneofDescriptor = protobuf.defineClassUnder("OneofDescriptor", runtime.getObject(), new ObjectAllocator() { @Override public IRubyObject allocate(Ruby ruby, RubyClass rubyClass) { return new RubyOneofDescriptor(ruby, rubyClass); } }); cRubyOneofDescriptor.defineAnnotatedMethods(RubyOneofDescriptor.class); cRubyOneofDescriptor.includeModule(runtime.getEnumerable()); }
public static RubyClass createJRubyObjectInputStream(Ruby runtime) { RubyClass result = runtime.defineClass("JRubyObjectInputStream",runtime.getObject(),JROIS_ALLOCATOR); result.defineAnnotatedMethods(JRubyObjectInputStream.class); return result; }
public static void createRubyRepeatedField(Ruby runtime) { RubyModule mProtobuf = runtime.getClassFromPath("Google::Protobuf"); RubyClass cRepeatedField = mProtobuf.defineClassUnder("RepeatedField", runtime.getObject(), new ObjectAllocator() { @Override public IRubyObject allocate(Ruby runtime, RubyClass klazz) { return new RubyRepeatedField(runtime, klazz); } }); cRepeatedField.defineAnnotatedMethods(RubyRepeatedField.class); cRepeatedField.includeModule(runtime.getEnumerable()); }