Examples of convertToString()


Examples of org.gocha.types.ToStringConverter.convertToString()

            try{
                Object objValue = vc.getValue();
                if( objValue==null )continue;

                String key = propertyPrefix==null ? propName : propertyPrefix + propName;
                String textValue = conv.convertToString(objValue);
                if( textValue==null )continue;

                setProperty(key, textValue);
            }catch(Throwable e){
                Logger.getLogger(GuiKeeper.class.getName()).log(Level.WARNING,null,e);
View Full Code Here

Examples of org.joni.ast.QuantifierNode.convertToString()

                    qn.lower > 1 && qn.lower <= EXPAND_STRING_MAX_LENGTH) {
                    StringNode sn = (StringNode)target;
                    int len = sn.length();

                    if (len * qn.lower <= EXPAND_STRING_MAX_LENGTH) {
                        StringNode str = qn.convertToString(sn.flag);
                        int n = qn.lower;
                        for (int i = 0; i < n; i++) {
                            str.cat(sn.bytes, sn.p, sn.end);
                        }
                        break; /* break case NT_QTFR: */
 
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.convertToString()

                sr = runtime.getNil();
                si = m.callMethod(context, "[]", RubyFixnum.one(runtime));
                if (si.isNil()) si = runtime.newString();
                IRubyObject t = m.callMethod(context, "[]", RubyFixnum.two(runtime));
                if (t.isNil()) t = runtime.newString(new ByteList(new byte[]{'1'}));
                si.convertToString().cat(t.convertToString().getByteList());
                re = m.callMethod(context, "post_match");
                po = false;
            }
        }
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.convertToString()

                si = runtime.getNil();
            } else {
                si = m.callMethod(context, "[]", RubyFixnum.three(runtime));
                IRubyObject t = m.callMethod(context, "[]", RubyFixnum.four(runtime));
                if (t.isNil()) t = runtime.newString(new ByteList(new byte[]{'1'}));
                si.convertToString().cat(t.convertToString().getByteList());
            }
            re = m.callMethod(context, "post_match");
            po = false;
        }
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.convertToString()

   
    private static IRubyObject str_to_c_strict(ThreadContext context, IRubyObject recv) {
        RubyArray a = str_to_c_internal(context, recv);
        if (a.eltInternal(0).isNil() || a.eltInternal(1).convertToString().getByteList().length() > 0) {
            IRubyObject s = recv.callMethod(context, "inspect");
            throw context.getRuntime().newArgumentError("invalid value for Complex: " + s.convertToString());
        }
        return a.eltInternal(0);
    }   
}
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.convertToString()

                        if (listSize-- <= 0) {
                            throw runtime.newArgumentError(sTooFew);
                        }

                        IRubyObject from = list.eltInternal(idx++);
                        lCurElemString = from == runtime.getNil() ? ByteList.EMPTY_BYTELIST : from.convertToString().getByteList();

                        if (isStar) {
                            occurrences = lCurElemString.length();
                            // 'Z' adds extra null pad (versus 'a')
                            if (type == 'Z') occurrences++;
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.convertToString()

                    {
                        if (listSize-- <= 0) {
                            throw runtime.newArgumentError(sTooFew);
                        }
                        IRubyObject from = list.eltInternal(idx++);
                        lCurElemString = from == runtime.getNil() ? ByteList.EMPTY_BYTELIST : from.convertToString().getByteList();
                        occurrences = occurrences <= 2 ? 45 : occurrences / 3 * 3;
                        if (lCurElemString.length() == 0) break;

                        byte[] charsToEncode = lCurElemString.bytes;
                        for (int i = 0; i < lCurElemString.length(); i += occurrences) {
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.convertToString()

        if (kcode != null && !kcode.isNil()) {
            code = KCode.create(recv.getRuntime(), kcode.toString());
        }
       
        RubyString src = str.convertToString();
        RubyString dst = RubyString.newString(recv.getRuntime(), quote(src.getByteList(), code));
        dst.infectBy(src);
        return dst;
    }
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.convertToString()

   
    private IRubyObject openFile(IRubyObject args[]) {
        IRubyObject filename = args[0].convertToString();
        getRuntime().checkSafeString(filename);
       
        path = filename.convertToString().getUnicodeValue();
       
        String modeString;
        ModeFlags modes;
        int perm;
       
View Full Code Here

Examples of org.jruby.runtime.builtin.IRubyObject.convertToString()

        int count = 0;
        RubyInteger mode = args[0].convertToInteger();
        for (int i = 1; i < args.length; i++) {
            IRubyObject filename = args[i];
           
            if (!RubyFileTest.exist_p(filename, filename.convertToString()).isTrue()) {
                throw runtime.newErrnoENOENTError("No such file or directory - " + filename);
            }
           
            boolean result = 0 == runtime.getPosix().chmod(filename.toString(), (int)mode.getLongValue());
            if (result) {
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.