Package org.luaj.vm2.lua2java

Examples of org.luaj.vm2.lua2java.JavaCodeGen$JavaClassWriterVisitor


        */
        return table;
    }

    private LuaValue lc() {
        return new TwoArgFunction() {
            @Override public LuaValue call(LuaValue code, LuaValue string) {
                return valueOf(string.checkjstring().toLowerCase(forLanguageTag(code.checkjstring())));
            }
        };
    }
View Full Code Here


            }
        };
    }

    private LuaValue uc() {
        return new TwoArgFunction() {
            @Override public LuaValue call(LuaValue code, LuaValue string) {
                return valueOf(string.checkjstring().toUpperCase(forLanguageTag(code.checkjstring())));
            }
        };
    }
View Full Code Here

            }
        };
    }

    private LuaValue fetchLanguageNames() {
        return new TwoArgFunction() {
            /**
             * Get an array of language names, indexed by code.
             *
             * @param inLanguage null|string: Code of language in which to return the names
             *                   Use null for autonyms (native names)
View Full Code Here

            }
        };
    }

    private LuaValue fetchLanguageName() {
        return new TwoArgFunction() {
            /**
             * @param code string: The code of the language for which to get the name
             * @param inLanguage null|string: Code of language in which to return the name (null for autonyms)
             * @return string: Language name or empty
             */
 
View Full Code Here

        iface.set("check", messageCheck());
        return iface;
    }

    private LuaValue messageCheck() {
        return new TwoArgFunction() {
            @Override
            public LuaValue call(LuaValue what, LuaValue data) {
                return FALSE;
            }
        };
View Full Code Here

            }
        };
    }

    private LuaValue newTitle() {
        return new TwoArgFunction() {
            /**
             * Handler for title.new
             *
             * @param text_or_id       string|int Title or page_id to fetch
             * @param defaultNamespace string|int Namespace name or number to use if $text_or_id doesn't override
View Full Code Here

            }
        };
    }

    private LuaValue pagesInCategory() {
        return new TwoArgFunction() {
            @Override public LuaValue call(LuaValue category, LuaValue which) {
                return LuaValue.valueOf(0);
            }
        };
    }
View Full Code Here

            }
        };
    }

    private LuaValue canonicalUrl() {
        return new TwoArgFunction() {
            @Override
            public LuaValue call(LuaValue page, LuaValue query) {
                if (query.isnil()) {
                    return LuaValue.valueOf(wgCanonicalServer + pagePath(page));
                } else {
View Full Code Here

            }
        };
    }

    private LuaValue fullUrl() {
        return new TwoArgFunction() {
            @Override
            public LuaValue call(LuaValue page, LuaValue query) {
                if (query.isnil()) {
                    return LuaValue.valueOf(wgServer + pagePath(page));
                } else {
View Full Code Here

            }
        };
    }

    private LuaValue localUrl() {
        return new TwoArgFunction() {
            @Override
            public LuaValue call(LuaValue page, LuaValue query) {
                if (query.isnil()) {
                    return LuaValue.valueOf(pagePath(page));
                } else {
View Full Code Here

TOP

Related Classes of org.luaj.vm2.lua2java.JavaCodeGen$JavaClassWriterVisitor

Copyright © 2018 www.massapicom. 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.