Examples of checkcast()


Examples of serp.bytecode.Code.checkcast()

        code.anew().setType(type);
        code.dup();
        if (params.length == 1) {
            code.aload().setParam(0);
            if (params[0] == Comparator.class) {
                code.checkcast().setType(SortedSet.class);
                code.invokeinterface().setMethod(SortedSet.class, "comparator",
                    Comparator.class, null);
            } else
                code.checkcast().setType(params[0]);
        }
View Full Code Here

Examples of serp.bytecode.Code.checkcast()

            if (params[0] == Comparator.class) {
                code.checkcast().setType(SortedSet.class);
                code.invokeinterface().setMethod(SortedSet.class, "comparator",
                    Comparator.class, null);
            } else
                code.checkcast().setType(params[0]);
        }
        code.invokespecial().setMethod(type, "<init>", void.class, params);
        if (params.length == 0 || params[0] == Comparator.class) {
            code.dup();
            code.aload().setParam(0);
View Full Code Here

Examples of serp.bytecode.Code.checkcast()

        }
        code.invokespecial().setMethod(type, "<init>", void.class, params);
        if (params.length == 0 || params[0] == Comparator.class) {
            code.dup();
            code.aload().setParam(0);
            code.checkcast().setType(Collection.class);
            code.invokevirtual().setMethod(type, "addAll", boolean.class,
                new Class[] { Collection.class });
            code.pop();
        }
        code.areturn();
View Full Code Here

Examples of serp.bytecode.Code.checkcast()

        code.anew().setType(type);
        code.dup();
        if (params.length == 1) {
            code.aload().setParam(0);
            if (params[0] == Comparator.class) {
                code.checkcast().setType(SortedMap.class);
                code.invokeinterface().setMethod(SortedMap.class, "comparator",
                    Comparator.class, null);
            } else
                code.checkcast().setType(params[0]);
        }
View Full Code Here

Examples of serp.bytecode.Code.checkcast()

            if (params[0] == Comparator.class) {
                code.checkcast().setType(SortedMap.class);
                code.invokeinterface().setMethod(SortedMap.class, "comparator",
                    Comparator.class, null);
            } else
                code.checkcast().setType(params[0]);
        }
        code.invokespecial().setMethod(type, "<init>", void.class, params);
        if (params.length == 0 || params[0] == Comparator.class) {
            code.dup();
            code.aload().setParam(0);
View Full Code Here

Examples of serp.bytecode.Code.checkcast()

        }
        code.invokespecial().setMethod(type, "<init>", void.class, params);
        if (params.length == 0 || params[0] == Comparator.class) {
            code.dup();
            code.aload().setParam(0);
            code.checkcast().setType(Map.class);
            code.invokevirtual().setMethod(type, "putAll", void.class,
                new Class[] { Map.class });
        }
        code.areturn();
        code.calculateMaxStack();
View Full Code Here

Examples of serp.bytecode.Code.checkcast()

        code.anew().setType(type);
        code.dup();
        if (params.length == 1) {
            if (params[0] == long.class) {
                code.aload().setParam(0);
                code.checkcast().setType(Date.class);
                code.invokevirtual().setMethod(Date.class, "getTime",
                    long.class, null);
            } else {
                code.aload().setParam(0);
                code.checkcast().setType(params[0]);
View Full Code Here

Examples of serp.bytecode.Code.checkcast()

                code.checkcast().setType(Date.class);
                code.invokevirtual().setMethod(Date.class, "getTime",
                    long.class, null);
            } else {
                code.aload().setParam(0);
                code.checkcast().setType(params[0]);
            }
        }
        code.invokespecial().setMethod(type, "<init>", void.class, params);
        if (params.length == 0) {
            code.dup();
View Full Code Here

Examples of serp.bytecode.Code.checkcast()

        }
        code.invokespecial().setMethod(type, "<init>", void.class, params);
        if (params.length == 0) {
            code.dup();
            code.aload().setParam(0);
            code.checkcast().setType(Date.class);
            code.invokevirtual().setMethod(Date.class, "getTime", long.class,
                null);
            code.invokevirtual().setMethod(type, "setTime", void.class,
                new Class[] { long.class });
        }
View Full Code Here

Examples of serp.bytecode.Code.checkcast()

        }
        if ((params.length == 0 || params[0] == long.class)
            && Timestamp.class.isAssignableFrom(type)) {
            code.dup();
            code.aload().setParam(0);
            code.checkcast().setType(Timestamp.class);
            code.invokevirtual().setMethod(Timestamp.class, "getNanos",
                int.class, null);
            code.invokevirtual().setMethod(type, "setNanos", void.class,
                new Class[] { int.class });
        }
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.