Package org.jruby

Examples of org.jruby.RubyModule.defineAnnotatedMethods()


@org.jruby.anno.JRubyModule(name = "ArJdbc::MySQL")
public class MySQLModule {

    public static RubyModule load(final RubyModule arJdbc) {
        RubyModule mysql = arJdbc.defineModuleUnder("MySQL");
        mysql.defineAnnotatedMethods(MySQLModule.class);
        return mysql;
    }

    public static RubyModule load(final Ruby runtime) {
        return load( arjdbc.ArJdbcModule.get(runtime) );
View Full Code Here


@org.jruby.anno.JRubyModule(name = "ArJdbc::Oracle")
public class OracleModule {

    public static RubyModule load(final RubyModule arJdbc) {
        RubyModule oracle = arJdbc.defineModuleUnder("Oracle");
        oracle.defineAnnotatedMethods( OracleModule.class );
        return oracle;
    }

    public static RubyModule load(final Ruby runtime) {
        return load( arjdbc.ArJdbcModule.get(runtime) );
View Full Code Here

@org.jruby.anno.JRubyModule(name = "ArJdbc::Derby")
public class DerbyModule {

    public static RubyModule load(final RubyModule arJdbc) {
        RubyModule derby = arJdbc.defineModuleUnder("Derby");
        derby.defineAnnotatedMethods( DerbyModule.class );
        RubyModule column = derby.defineModuleUnder("Column");
        column.defineAnnotatedMethods(Column.class);
        return derby;
    }
View Full Code Here

    public static RubyModule load(final RubyModule arJdbc) {
        RubyModule derby = arJdbc.defineModuleUnder("Derby");
        derby.defineAnnotatedMethods( DerbyModule.class );
        RubyModule column = derby.defineModuleUnder("Column");
        column.defineAnnotatedMethods(Column.class);
        return derby;
    }

    public static RubyModule load(final Ruby runtime) {
        return load( arjdbc.ArJdbcModule.get(runtime) );
View Full Code Here

       
        RubyClass text = xmlModule.defineClassUnder("Text", characterData, XML_TEXT_ALLOCATOR);
        text.defineAnnotatedMethods(XmlText.class);
       
        RubyModule cdata = xmlModule.defineClassUnder("CDATA", text, XML_CDATA_ALLOCATOR);
        cdata.defineAnnotatedMethods(XmlCdata.class);
       
        RubyClass dtd = xmlModule.defineClassUnder("DTD", node, XML_DTD_ALLOCATOR);
        dtd.defineAnnotatedMethods(XmlDtd.class);

        RubyClass documentFragment = xmlModule.defineClassUnder("DocumentFragment", node, XML_DOCUMENT_FRAGMENT_ALLOCATOR);
View Full Code Here

        RubyClass xmlDocument = xmlModule.defineClassUnder("Document", node, XML_DOCUMENT_ALLOCATOR);
        xmlDocument.defineAnnotatedMethods(XmlDocument.class);
       
        //RubyModule htmlDoc = html.defineOrGetClassUnder("Document", document);
        RubyModule htmlDocument = htmlModule.defineClassUnder("Document", xmlDocument, HTML_DOCUMENT_ALLOCATOR);
        htmlDocument.defineAnnotatedMethods(HtmlDocument.class);
    }
   
    private void createSaxModule(Ruby ruby, RubyModule xmlSaxModule, RubyModule htmlSaxModule) {
        RubyClass xmlSaxParserContext = xmlSaxModule.defineClassUnder("ParserContext", ruby.getObject(), XML_SAXPARSER_CONTEXT_ALLOCATOR);
        xmlSaxParserContext.defineAnnotatedMethods(XmlSaxParserContext.class);
View Full Code Here

import org.jruby.runtime.load.BasicLibraryService;

public class MixologyService implements BasicLibraryService {
    public boolean basicLoad(final Ruby runtime) throws IOException {
        RubyModule mixologyModule = runtime.defineModule("Mixology");
        mixologyModule.defineAnnotatedMethods(MixologyService.class);
      runtime.getObject().includeModule(mixologyModule);
        return true;
    }
   
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.