Examples of invokespecial()


Examples of org.jboss.classfilewriter.code.CodeAttribute.invokespecial()

            ca.getfield(getClassName(), CONSTRUCTED_GUARD, "Z");
            // if the object has not been constructed yet invoke the superclass version of the method
            BranchEnd end = ca.ifne();
            ca.aload(0);
            ca.loadMethodParameters();
            ca.invokespecial(getSuperClassName(), method.getName(), method.getDescriptor());
            ca.returnInstruction();
            // normal invocation path begins here
            ca.branchEnd(end);
            ca.aload(0);
            ca.getfield(getClassName(), INVOCATION_HANDLER_FIELD, InvocationHandler.class);
View Full Code Here

Examples of org.jplastic.core.InstructionBuilder.invokeSpecial()

    {
        InstructionBuilder builder = newBuilder(methodDescription, methodNode);

        builder.loadThis();
        builder.loadArguments();
        builder.invokeSpecial(superClassName, methodDescription);
        builder.returnResult();
    }

    /**
     * Iterates over all non-introduced methods, including the original constructor. For each
View Full Code Here

Examples of org.jruby.compiler.impl.SkinnyMethodAdapter.invokespecial()

        cw.visitSource("<generated>", null);
       
        SkinnyMethodAdapter method = new SkinnyMethodAdapter(cw.visitMethod(ACC_PUBLIC, "<init>", sig(void.class), null, null));
        method.start();
        method.aload(0);
        method.invokespecial(p(Object.class), "<init>", sig(void.class));
        method.voidreturn();
        method.end();
       
        method = new SkinnyMethodAdapter(cw.visitMethod(ACC_PUBLIC, "throwException", sig(void.class, Throwable.class), null, null));
        method.start();
View Full Code Here

Examples of org.jruby.compiler.impl.SkinnyMethodAdapter.invokespecial()

        cw.visitField(ACC_PRIVATE | ACC_FINAL, "self", ci(IRubyObject.class), null, null).visitEnd();
       
        // create constructor
        SkinnyMethodAdapter initMethod = new SkinnyMethodAdapter(cw.visitMethod(ACC_PUBLIC, "<init>", sig(void.class), null, null));
        initMethod.aload(0);
        initMethod.invokespecial(p(Object.class), "<init>", sig(void.class));
       
        // wrap self and store the wrapper
        initMethod.aload(0);
        initMethod.getstatic(name, "ruby", ci(Ruby.class));
        initMethod.aload(0);
View Full Code Here

Examples of org.jruby.compiler.impl.SkinnyMethodAdapter.invokespecial()

        cw.visitField(ACC_PRIVATE | ACC_FINAL, "self", ci(IRubyObject.class), null, null).visitEnd();
       
        // create constructor
        SkinnyMethodAdapter initMethod = new SkinnyMethodAdapter(cw.visitMethod(ACC_PUBLIC, "<init>", sig(void.class, IRubyObject.class), null, null));
        initMethod.aload(0);
        initMethod.invokespecial(p(Object.class), "<init>", sig(void.class));
       
        // store the wrapper
        initMethod.aload(0);
        initMethod.aload(1);
        initMethod.putfield(pathName, "self", ci(IRubyObject.class));
View Full Code Here

Examples of org.jruby.compiler.impl.SkinnyMethodAdapter.invokespecial()

               
                // TODO: this code should really check if a Ruby equals method is implemented or not.
                if(simpleName.equals("equals") && paramTypes.length == 1 && paramTypes[0] == Object.class && returnType == Boolean.TYPE) {
                    mv.aload(0);
                    mv.aload(1);
                    mv.invokespecial(p(Object.class), "equals", sig(Boolean.TYPE, params(Object.class)));
                    mv.ireturn();
                } else if(simpleName.equals("hashCode") && paramTypes.length == 0 && returnType == Integer.TYPE) {
                    mv.aload(0);
                    mv.invokespecial(p(Object.class), "hashCode", sig(Integer.TYPE));
                    mv.ireturn();
View Full Code Here

Examples of org.jruby.compiler.impl.SkinnyMethodAdapter.invokespecial()

                    mv.aload(1);
                    mv.invokespecial(p(Object.class), "equals", sig(Boolean.TYPE, params(Object.class)));
                    mv.ireturn();
                } else if(simpleName.equals("hashCode") && paramTypes.length == 0 && returnType == Integer.TYPE) {
                    mv.aload(0);
                    mv.invokespecial(p(Object.class), "hashCode", sig(Integer.TYPE));
                    mv.ireturn();
                } else if(simpleName.equals("toString") && paramTypes.length == 0 && returnType == String.class) {
                    mv.aload(0);
                    mv.invokespecial(p(Object.class), "toString", sig(String.class));
                    mv.areturn();
View Full Code Here

Examples of org.jruby.compiler.impl.SkinnyMethodAdapter.invokespecial()

                    mv.aload(0);
                    mv.invokespecial(p(Object.class), "hashCode", sig(Integer.TYPE));
                    mv.ireturn();
                } else if(simpleName.equals("toString") && paramTypes.length == 0 && returnType == String.class) {
                    mv.aload(0);
                    mv.invokespecial(p(Object.class), "toString", sig(String.class));
                    mv.areturn();
                } else {
                    Label dispatch = new Label();
                    Label end = new Label();
                    Label recheckMethod = new Label();
View Full Code Here

Examples of org.jruby.compiler.impl.SkinnyMethodAdapter.invokespecial()

       
        // constructor
        m = new SkinnyMethodAdapter(cv.visitMethod(ACC_PUBLIC, "<init>", sig(void.class), null, null));
        m.start();
        m.aload(0);
        m.invokespecial(p(Handle.class), "<init>", sig(void.class));
        m.voidreturn();
        m.end();
       
        cv.visitEnd();
       
View Full Code Here

Examples of org.jruby.compiler.impl.SkinnyMethodAdapter.invokespecial()

        cw.visitField(ACC_PRIVATE | ACC_FINAL, "$scriptObject", ci(Object.class), null, null);
        SkinnyMethodAdapter mv = new SkinnyMethodAdapter(cw.visitMethod(ACC_PUBLIC, "<init>", sig(Void.TYPE, params(Object.class)), null, null));
        mv.start();
        mv.aload(0);
        mv.aload(1);
        mv.invokespecial(p(AbstractCompiledBlockCallback.class), "<init>", sig(void.class, Object.class));
        mv.voidreturn();
        mv.end();
       
        return cw;
    }
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.