Package org.jruby

Examples of org.jruby.RubyModule.defineAnnotatedMethods()


     * @throws IOException
     */
    public static void createArcBall(final Ruby runtime) throws IOException {
        RubyModule processing = runtime.defineModule("Processing");
        RubyModule arcBallModule = processing.defineModuleUnder("ArcBall");
        arcBallModule.defineAnnotatedMethods(Rarcball.class);
    }

    /**
     *
     * @param runtime
View Full Code Here


    if (sl == null) {
        runtime.getObject().setConstant("SCRIPT_LINES__", RubyHash.newHash(runtime));
    }
   
    rubyApi = JavaEmbedUtils.newObjectAdapter();
    rcov__.defineAnnotatedMethods(RcovrtService.class);
    return true;
  }
 
  @JRubyMethod(name="reset_callsite", meta = true)
  public static IRubyObject resetCallsite(IRubyObject recv) {
View Full Code Here

import org.jruby.util.ByteList;

public class JdbcMySQLSpec {
    public static void load(RubyModule jdbcSpec) {
        RubyModule mysql = jdbcSpec.defineModuleUnder("MySQL");
        mysql.defineAnnotatedMethods(JdbcMySQLSpec.class);
    }

    private final static byte BACKQUOTE = '`';
    private final static byte[] QUOTED_DOT = new byte[] {'`', '.', '`'};
View Full Code Here

public class JdbcDerbySpec {
    private static RubyObjectAdapter rubyApi;
    public static void load(RubyModule jdbcSpec, RubyObjectAdapter adapter) {
        RubyModule derby = jdbcSpec.defineModuleUnder("Derby");
        derby.defineAnnotatedMethods(JdbcDerbySpec.class);
        RubyModule column = derby.defineModuleUnder("Column");
        column.defineAnnotatedMethods(Column.class);
        rubyApi = adapter;
    }
View Full Code Here

    private static RubyObjectAdapter rubyApi;
    public static void load(RubyModule jdbcSpec, RubyObjectAdapter adapter) {
        RubyModule derby = jdbcSpec.defineModuleUnder("Derby");
        derby.defineAnnotatedMethods(JdbcDerbySpec.class);
        RubyModule column = derby.defineModuleUnder("Column");
        column.defineAnnotatedMethods(Column.class);
        rubyApi = adapter;
    }

    public static class Column {
        @JRubyMethod(name = "type_cast", required = 1)
View Full Code Here

    public boolean basicLoad(Ruby runtime) throws IOException {
        RubyModule diametric = runtime.defineModule("Diametric");
        RubyModule persistence = diametric.defineModuleUnder("Persistence");

        RubyModule diametric_peer = persistence.defineModuleUnder("Peer");
        diametric_peer.defineAnnotatedMethods(DiametricPeer.class);

        RubyClass connection = persistence.defineClassUnder("Connection", runtime.getObject(), CONNECTION_ALLOCATOR);
        connection.defineAnnotatedMethods(DiametricConnection.class);
        //[:db-before, :db-after, :tx-data, :tempids]"
        //connection.defineConstant("DB_BEFORE", );
View Full Code Here

        RubyClass diametric_function = persistence.defineClassUnder("Function", runtime.getObject(), FUNCTION_ALLOCATOR);
        diametric_function.defineAnnotatedMethods(DiametricFunction.class);

        RubyModule diametric_utils = persistence.defineModuleUnder("Utils");
        diametric_utils.defineAnnotatedMethods(DiametricUtils.class);

        setupClojureRT();
        initializeKeywordMap();

        return false;
View Full Code Here

        RubyModule mReadline = runtime.defineModule("Readline");

        mReadline.dataWrapStruct(holder);

        mReadline.defineAnnotatedMethods(Readline.class);
        IRubyObject hist = runtime.getObject().callMethod(runtime.getCurrentContext(), "new");
        mReadline.setConstant("HISTORY", hist);
        hist.getSingletonClass().includeModule(runtime.getEnumerable());
        hist.getSingletonClass().defineAnnotatedMethods(HistoryMethods.class);
View Full Code Here

    }
   
    public void testInvocationMethodFactory() {
        RubyModule mod = runtime.defineModule("Wombat" + hashCode());

        mod.defineAnnotatedMethods(MyBoundClass.class);
    }

    public void testReflectionMethodFactory() {
        RubyModule mod = runtime.defineModule("Wombat" + hashCode());
View Full Code Here

    }

    public void testReflectionMethodFactory() {
        RubyModule mod = runtime.defineModule("Wombat" + hashCode());

        mod.defineAnnotatedMethods(MyBoundClass.class);

        confirmMethods(mod);
    }

    // #1194: ClassFormatError with Nokogiri 1.6.0
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.