Examples of includeModule()


Examples of org.jruby.RubyClass.includeModule()

            public boolean isKindOf(IRubyObject obj, RubyModule type) {
                return obj instanceof RubySchema;
            }
        };

        result.includeModule(runtime.getEnumerable());

        result.defineAnnotatedMethods(RubySchema.class);

        return result;
    }
View Full Code Here

Examples of org.jruby.RubyClass.includeModule()

                return obj instanceof RubyDataBag;
            }
        };

        // This includes the Enumerable module that we specified.
        result.includeModule(runtime.getEnumerable());

        // This method actually reads the annotations we placed and registers
        // all of the methods.
        result.defineAnnotatedMethods(RubyDataBag.class);
View Full Code Here

Examples of org.jruby.RubyClass.includeModule()

    }

    public static void define(Ruby ruby, RubyModule pg, RubyModule constants) {
        RubyClass connection = pg.defineClassUnder("Connection", ruby.getObject(), CONNECTION_ALLOCATOR);

        connection.includeModule(constants);

        connection.defineAnnotatedMethods(Connection.class);

        connection.getSingletonClass().defineAlias("connect", "new");
        connection.getSingletonClass().defineAlias("open", "new");
View Full Code Here

Examples of org.jruby.RubyClass.includeModule()

    }

    public static void define(Ruby ruby, RubyModule pg, RubyModule constants) {
        RubyClass result = pg.defineClassUnder("Result", ruby.getObject(), ObjectAllocator.NOT_ALLOCATABLE_ALLOCATOR);

        result.includeModule(ruby.getEnumerable());
        result.includeModule(constants);

        pg.defineClassUnder("LargeObjectFd", ruby.getObject(), ObjectAllocator.NOT_ALLOCATABLE_ALLOCATOR);

        result.defineAnnotatedMethods(Result.class);
View Full Code Here

Examples of org.jruby.RubyClass.includeModule()

    public static void define(Ruby ruby, RubyModule pg, RubyModule constants) {
        RubyClass result = pg.defineClassUnder("Result", ruby.getObject(), ObjectAllocator.NOT_ALLOCATABLE_ALLOCATOR);

        result.includeModule(ruby.getEnumerable());
        result.includeModule(constants);

        pg.defineClassUnder("LargeObjectFd", ruby.getObject(), ObjectAllocator.NOT_ALLOCATABLE_ALLOCATOR);

        result.defineAnnotatedMethods(Result.class);
    }
View Full Code Here

Examples of org.jruby.RubyModule.includeModule()

                    for (int i = interfaces.length; --i >= 0;) {
                        JavaClass ifc = JavaClass.get(runtime, interfaces[i]);
                        // java.util.Map type object has its own proxy, but following
                        // is needed. Unless kind_of?(is_a?) test will fail.
                        //if (interfaces[i] != java.util.Map.class) {
                            proxyClass.includeModule(getInterfaceModule(runtime, ifc));
                        //}
                    }
                    if (Modifier.isPublic(c.getModifiers())) {
                        addToJavaPackageModule(proxyClass, javaClass);
                    }
View Full Code Here

Examples of org.jruby.RubyModule.includeModule()

                    for (int i = interfaces.length; --i >= 0;) {
                        JavaClass ifc = JavaClass.get(runtime, interfaces[i]);
                        // java.util.Map type object has its own proxy, but following
                        // is needed. Unless kind_of?(is_a?) test will fail.
                        //if (interfaces[i] != java.util.Map.class) {
                            proxyClass.includeModule(getInterfaceModule(runtime, ifc));
                        //}
                    }
                    if (Modifier.isPublic(c.getModifiers())) {
                        addToJavaPackageModule(proxyClass, javaClass);
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.