Example usage for org.objectweb.asm.commons Method getMethod

List of usage examples for org.objectweb.asm.commons Method getMethod

Introduction

In this page you can find the example usage for org.objectweb.asm.commons Method getMethod.

Prototype

public static Method getMethod(final String method) 

Source Link

Document

Returns a Method corresponding to the given Java method declaration.

Usage

From source file:com.xruby.compiler.codegen.MethodGenerator.java

License:BSD License

public void RubyHash_addValue() {
    invokeVirtual(Types.RUBY_HASH_TYPE, Method.getMethod(
            "com.xruby.runtime.builtin.RubyHash add(com.xruby.runtime.lang.RubyValue, com.xruby.runtime.lang.RubyValue)"));
}

From source file:com.xruby.compiler.codegen.MethodGenerator.java

License:BSD License

public void ObjectFactory_createFixnum(int value) {
    if (value >= 0 && value <= 10) {
        getStatic(Types.OBJECTFACTORY_TYPE, "FIXNUM" + value, Types.RUBY_FIXNUM_TYPE);
        return;/*w w w .j  a v a 2 s. c om*/
    }

    Integer i = integer_table_.getInteger(value);
    if (null != i) {
        loadLocal(i);
        return;
    }

    push(value);
    invokeStatic(Types.OBJECTFACTORY_TYPE,
            Method.getMethod("com.xruby.runtime.builtin.RubyFixnum createFixnum(int)"));
}

From source file:com.xruby.compiler.codegen.MethodGenerator.java

License:BSD License

public void ObjectFactory_createFloat(double value) {
    push(value);//from   w  w  w  .  ja  va2s.com
    invokeStatic(Types.OBJECTFACTORY_TYPE,
            Method.getMethod("com.xruby.runtime.builtin.RubyFloat createFloat(double)"));
}

From source file:com.xruby.compiler.codegen.MethodGenerator.java

License:BSD License

public void ObjectFactory_createBignum(BigInteger value) {
    push(value.toString());/*from  ww  w . j a  v  a2  s  . c  om*/
    invokeStatic(Types.OBJECTFACTORY_TYPE,
            Method.getMethod("com.xruby.runtime.builtin.RubyBignum createBignum(String)"));
}

From source file:com.xruby.compiler.codegen.MethodGenerator.java

License:BSD License

public void ObjectFactory_createString(String value) {
    push(value);//  w  w  w .  j a v  a2s .  c om
    invokeStatic(Types.OBJECTFACTORY_TYPE,
            Method.getMethod("com.xruby.runtime.builtin.RubyString createString(String)"));
}

From source file:com.xruby.compiler.codegen.MethodGenerator.java

License:BSD License

public void ObjectFactory_createString() {
    invokeStatic(Types.OBJECTFACTORY_TYPE,
            Method.getMethod("com.xruby.runtime.builtin.RubyString createString()"));
}

From source file:com.xruby.compiler.codegen.MethodGenerator.java

License:BSD License

public void ObjectFactory_createRegexp(String value, String option) {
    push(value);//from  w w w. j  a v a  2s.  c  o m
    push(option);
    invokeStatic(Types.OBJECTFACTORY_TYPE,
            Method.getMethod("com.xruby.runtime.builtin.RubyRegexp createRegexp(String, String)"));
}

From source file:com.xruby.compiler.codegen.MethodGenerator.java

License:BSD License

public void ObjectFactory_createRegexp(String option) {
    invokeVirtual(Types.RUBY_STRING_TYPE, Method.getMethod("String toString()"));
    push(option);//from  ww  w  .  j  av  a  2s  . co m
    invokeStatic(Types.OBJECTFACTORY_TYPE,
            Method.getMethod("com.xruby.runtime.builtin.RubyRegexp createRegexp(String, String)"));
}

From source file:com.xruby.compiler.codegen.MethodGenerator.java

License:BSD License

public void ObjectFactory_createSymbol(String value) {
    if (null != value) {
        push(value);//from w w w  .  j  av a2s  .  c o  m
    } else {
        invokeVirtual(Types.RUBY_STRING_TYPE, Method.getMethod("String toString()"));
    }
    invokeStatic(Types.OBJECTFACTORY_TYPE,
            Method.getMethod("com.xruby.runtime.lang.RubySymbol createSymbol(String)"));
}

From source file:com.xruby.compiler.codegen.MethodGenerator.java

License:BSD License

public void ObjectFactory_createArray(int size, int rhs_size, boolean has_single_asterisk) {
    push(size);//w w  w  .ja  v a2 s  .c o  m
    push(rhs_size);
    push(has_single_asterisk);
    invokeStatic(Types.OBJECTFACTORY_TYPE,
            Method.getMethod("com.xruby.runtime.builtin.RubyArray createArray(int, int, boolean)"));
}