Examples of JavaConstructor


Examples of org.jruby.javasupport.JavaConstructor

    @Override
    public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1) {
        if (javaVarargsCallables != null) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1});
        JavaProxy proxy = castJavaProxy(self);
        JavaConstructor constructor = (JavaConstructor)findCallableArityTwo(self, name, arg0, arg1);
        Object cArg0 = convertArg(arg0, constructor, 0);
        Object cArg1 = convertArg(arg1, constructor, 1);

        proxy.setObject(constructor.newInstanceDirect(context, cArg0, cArg1));

        return self;
    }
View Full Code Here

Examples of org.jruby.javasupport.JavaConstructor

    @Override
    public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) {
        if (javaVarargsCallables != null) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1, arg2});
        JavaProxy proxy = castJavaProxy(self);
        JavaConstructor constructor = (JavaConstructor)findCallableArityThree(self, name, arg0, arg1, arg2);
        Object cArg0 = convertArg(arg0, constructor, 0);
        Object cArg1 = convertArg(arg1, constructor, 1);
        Object cArg2 = convertArg(arg2, constructor, 2);

        proxy.setObject(constructor.newInstanceDirect(context, cArg0, cArg1, cArg2));

        return self;
    }
View Full Code Here

Examples of org.openquark.cal.internal.javamodel.JavaConstructor

            // Import the constructors for each inner class (i.e. each data constructor)
            // Pull in the constructor for the Java class.
            for (int i = 0, n = javaClass.getNInnerClasses(); i < n; ++i) {
                JavaClassRep innerClass = javaClass.getInnerClass(i);
                assert (innerClass.getNConstructors() == 1);
                JavaConstructor constructor = innerClass.getConstructor(0);
                topLevelDefnsList.add(importJavaConstructor(constructor, true));
            }
           
            // Create accessors for fields in the top level class.
            for (FieldName fn : typeConstructorInfo.commonFieldNames) {
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.