Package org.objectweb.asm.commons

Examples of org.objectweb.asm.commons.GeneratorAdapter.newInstance()


        Type thr = Type.getType(Throwable.class);
        Label handler = ga.mark();
        Type udt = Type.getType(UndeclaredThrowableException.class);
        int loc = ga.newLocal(thr);
        ga.storeLocal(loc, thr);
        ga.newInstance(udt);
        ga.dup();
        ga.loadLocal(loc, thr);
        ga.invokeConstructor(udt, org.objectweb.asm.commons.Method
                .getMethod("void <init>(java.lang.Throwable)"));
        ga.throwException();
View Full Code Here


        }
    }

    private void meaningfulToString() {
        GeneratorAdapter adapter = method(ACC_PUBLIC, toString);
        adapter.newInstance(stringBuilder);
        adapter.dup();
        adapter.invokeConstructor(stringBuilder, stringBuilderConstructor);
        adapter.push("[" + methodName() + " on ");
        adapter.invokeVirtual(stringBuilder, appendString);
        loadReceiver(adapter);
View Full Code Here

        staticInitializer();
    }

    private void staticInitializer() {
        GeneratorAdapter adapter = method(ACC_STATIC, asmMethod("void <clinit> ()"));
        adapter.newInstance(objectType);
        adapter.dup();
        adapter.invokeConstructor(objectType, defaultConstructor);
        adapter.putStatic(outputType(), "SIGNAL", objectType);
        adapter.returnValue();
        adapter.endMethod();
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.