Examples of defineConstant()


Examples of org.jruby.RubyModule.defineConstant()

        platform.defineConstant("IS_WINDOWS", runtime.newBoolean(IS_WINDOWS));
        platform.defineConstant("IS_BSD", runtime.newBoolean(IS_BSD));
        platform.defineConstant("IS_FREEBSD", runtime.newBoolean(IS_FREEBSD));
        platform.defineConstant("IS_OPENBSD", runtime.newBoolean(IS_OPENBSD));
        platform.defineConstant("IS_SOLARIS", runtime.newBoolean(IS_SOLARIS));
        platform.defineConstant("IS_LINUX", runtime.newBoolean(IS_LINUX));
        platform.defineConstant("IS_MAC", runtime.newBoolean(IS_MAC));
        platform.defineConstant("LIBC", runtime.newString(LIBC));
        platform.defineConstant("BYTE_ORDER", runtime.newFixnum(BYTE_ORDER));
        platform.defineConstant("BIG_ENDIAN", runtime.newFixnum(BIG_ENDIAN));
        platform.defineConstant("LITTLE_ENDIAN", runtime.newFixnum(LITTLE_ENDIAN));
View Full Code Here

Examples of org.jruby.RubyModule.defineConstant()

        platform.defineConstant("IS_BSD", runtime.newBoolean(IS_BSD));
        platform.defineConstant("IS_FREEBSD", runtime.newBoolean(IS_FREEBSD));
        platform.defineConstant("IS_OPENBSD", runtime.newBoolean(IS_OPENBSD));
        platform.defineConstant("IS_SOLARIS", runtime.newBoolean(IS_SOLARIS));
        platform.defineConstant("IS_LINUX", runtime.newBoolean(IS_LINUX));
        platform.defineConstant("IS_MAC", runtime.newBoolean(IS_MAC));
        platform.defineConstant("LIBC", runtime.newString(LIBC));
        platform.defineConstant("BYTE_ORDER", runtime.newFixnum(BYTE_ORDER));
        platform.defineConstant("BIG_ENDIAN", runtime.newFixnum(BIG_ENDIAN));
        platform.defineConstant("LITTLE_ENDIAN", runtime.newFixnum(LITTLE_ENDIAN));
    }
View Full Code Here

Examples of org.jruby.RubyModule.defineConstant()

        platform.defineConstant("IS_FREEBSD", runtime.newBoolean(IS_FREEBSD));
        platform.defineConstant("IS_OPENBSD", runtime.newBoolean(IS_OPENBSD));
        platform.defineConstant("IS_SOLARIS", runtime.newBoolean(IS_SOLARIS));
        platform.defineConstant("IS_LINUX", runtime.newBoolean(IS_LINUX));
        platform.defineConstant("IS_MAC", runtime.newBoolean(IS_MAC));
        platform.defineConstant("LIBC", runtime.newString(LIBC));
        platform.defineConstant("BYTE_ORDER", runtime.newFixnum(BYTE_ORDER));
        platform.defineConstant("BIG_ENDIAN", runtime.newFixnum(BIG_ENDIAN));
        platform.defineConstant("LITTLE_ENDIAN", runtime.newFixnum(LITTLE_ENDIAN));
    }
   
View Full Code Here

Examples of org.jruby.RubyModule.defineConstant()

        platform.defineConstant("IS_OPENBSD", runtime.newBoolean(IS_OPENBSD));
        platform.defineConstant("IS_SOLARIS", runtime.newBoolean(IS_SOLARIS));
        platform.defineConstant("IS_LINUX", runtime.newBoolean(IS_LINUX));
        platform.defineConstant("IS_MAC", runtime.newBoolean(IS_MAC));
        platform.defineConstant("LIBC", runtime.newString(LIBC));
        platform.defineConstant("BYTE_ORDER", runtime.newFixnum(BYTE_ORDER));
        platform.defineConstant("BIG_ENDIAN", runtime.newFixnum(BIG_ENDIAN));
        platform.defineConstant("LITTLE_ENDIAN", runtime.newFixnum(LITTLE_ENDIAN));
    }
   
    /**
 
View Full Code Here

Examples of org.jruby.RubyModule.defineConstant()

        platform.defineConstant("IS_SOLARIS", runtime.newBoolean(IS_SOLARIS));
        platform.defineConstant("IS_LINUX", runtime.newBoolean(IS_LINUX));
        platform.defineConstant("IS_MAC", runtime.newBoolean(IS_MAC));
        platform.defineConstant("LIBC", runtime.newString(LIBC));
        platform.defineConstant("BYTE_ORDER", runtime.newFixnum(BYTE_ORDER));
        platform.defineConstant("BIG_ENDIAN", runtime.newFixnum(BIG_ENDIAN));
        platform.defineConstant("LITTLE_ENDIAN", runtime.newFixnum(LITTLE_ENDIAN));
    }
   
    /**
     * An extension over <code>System.getProperty</code> method.
View Full Code Here

Examples of org.jruby.RubyModule.defineConstant()

        platform.defineConstant("IS_LINUX", runtime.newBoolean(IS_LINUX));
        platform.defineConstant("IS_MAC", runtime.newBoolean(IS_MAC));
        platform.defineConstant("LIBC", runtime.newString(LIBC));
        platform.defineConstant("BYTE_ORDER", runtime.newFixnum(BYTE_ORDER));
        platform.defineConstant("BIG_ENDIAN", runtime.newFixnum(BIG_ENDIAN));
        platform.defineConstant("LITTLE_ENDIAN", runtime.newFixnum(LITTLE_ENDIAN));
    }
   
    /**
     * An extension over <code>System.getProperty</code> method.
     * Handles security restrictions, and returns the default
View Full Code Here

Examples of org.jruby.RubyModule.defineConstant()

            module.defineConstant("InvokerFactory", provider);
            module.defineConstant("CallbackFactory", provider);
            module.defineConstant("LastError", provider);
            RubyModule nativeType = module.defineModuleUnder("NativeType");
            for (NativeType type : NativeType.values()) {
                nativeType.defineConstant(type.name(), runtime.newFixnum(type.ordinal()));
            }
            Platform.getPlatform().init(runtime, module);
        }
    }
   
View Full Code Here

Examples of org.jruby.RubyModule.defineConstant()

                namespace = (RubyModule) self;
            } else {
                namespace = self.getMetaClass().getRealClass();
            }

            namespace.defineConstant(cls.getSimpleName(), getMirrorForClass(context.getRuntime(), cls));

            return context.getRuntime().getNil();
        } catch (Exception e) {
            if (context.getRuntime().getDebug().isTrue()) {
                e.printStackTrace();
View Full Code Here

Examples of org.jruby.RubyModule.defineConstant()

                namespace = (RubyModule) self;
            } else {
                namespace = self.getMetaClass().getRealClass();
            }

            namespace.defineConstant(as.toString(), getMirrorForClass(context.getRuntime(), cls));

            return context.getRuntime().getNil();
        } catch (Exception e) {
            if (context.getRuntime().getDebug().isTrue()) {
                e.printStackTrace();
View Full Code Here

Examples of org.jruby.RubyModule.defineConstant()

        RubyModule configModule = runtime.defineModule("Config");
       
        configModule.defineAnnotatedMethods(RbConfigLibrary.class);
       
        RubyHash configHash = RubyHash.newHash(runtime);
        configModule.defineConstant("CONFIG", configHash);
        runtime.getObject().defineConstant("RbConfig", configModule);

        String[] versionParts = Constants.RUBY_VERSION.split("\\.");
        setConfig(configHash, "MAJOR", versionParts[0]);
        setConfig(configHash, "MINOR", versionParts[1]);
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.