Package serp.bytecode

Examples of serp.bytecode.BCMethod.makePublic()


        code.calculateMaxStack();
        code.calculateMaxLocals();
       
        if (changeTracker) {
            m = bc.declareMethod("getChangeTracker", ChangeTracker.class, null);
            m.makePublic();
            code = m.getCode(true);
            code.constant().setNull();
            code.areturn();
            code.calculateMaxStack();
            code.calculateMaxLocals();
View Full Code Here


        BCField changeTracker = bc.declareField("changeTracker",
            CollectionChangeTracker.class);
        changeTracker.setTransient(true);
        BCMethod m = bc.declareMethod("getChangeTracker", ChangeTracker.class,
            null);
        m.makePublic();
        Code code = m.getCode(true);
        code.aload().setThis();
        code.getfield().setField(changeTracker);
        code.areturn();
        code.calculateMaxStack();
View Full Code Here

            cons = findComparatorConstructor(type);
        Class[] params = (cons == null) ? new Class[0]
            : cons.getParameterTypes();

        m = bc.declareMethod("copy", Object.class, new Class[] {Object.class});
        m.makePublic();
        code = m.getCode(true);

        code.anew().setType(type);
        code.dup();
        if (params.length == 1) {
View Full Code Here

        // element type
        BCField elementType = bc.declareField("elementType", Class.class);
        elementType.setTransient(true);
        m = bc.declareMethod("getElementType", Class.class, null);
        m.makePublic();
        code = m.getCode(true);
        code.aload().setThis();
        code.getfield().setField(elementType);
        code.areturn();
        code.calculateMaxStack();
View Full Code Here

        code.calculateMaxLocals();

        // new instance factory
        m = bc.declareMethod("newInstance", ProxyCollection.class,
            new Class[] { Class.class, Comparator.class, boolean.class, boolean.class });
        m.makePublic();
        code = m.getCode(true);

        code.anew().setType(bc);
        code.dup();
        cons = findComparatorConstructor(type);
View Full Code Here

        BCField changeTracker = bc.declareField("changeTracker",
            MapChangeTracker.class);
        changeTracker.setTransient(true);
        BCMethod m = bc.declareMethod("getChangeTracker", ChangeTracker.class,
            null);
        m.makePublic();
        Code code = m.getCode(true);
        code.aload().setThis();
        code.getfield().setField(changeTracker);
        code.areturn();
        code.calculateMaxStack();
View Full Code Here

            cons = findComparatorConstructor(type);
        Class[] params = (cons == null) ? new Class[0]
            : cons.getParameterTypes();

        m = bc.declareMethod("copy", Object.class, new Class[] {Object.class});
        m.makePublic();
        code = m.getCode(true);

        code.anew().setType(type);
        code.dup();
        if (params.length == 1) {
View Full Code Here

        // key type
        BCField keyType = bc.declareField("keyType", Class.class);
        keyType.setTransient(true);
        m = bc.declareMethod("getKeyType", Class.class, null);
        m.makePublic();
        code = m.getCode(true);
        code.aload().setThis();
        code.getfield().setField(keyType);
        code.areturn();
        code.calculateMaxStack();
View Full Code Here

        // value type
        BCField valueType = bc.declareField("valueType", Class.class);
        valueType.setTransient(true);
        m = bc.declareMethod("getValueType", Class.class, null);
        m.makePublic();
        code = m.getCode(true);
        code.aload().setThis();
        code.getfield().setField(valueType);
        code.areturn();
        code.calculateMaxStack();
View Full Code Here

        // new instance factory
        m = bc.declareMethod("newInstance", ProxyMap.class,
            new Class[] { Class.class, Class.class, Comparator.class,
            boolean.class,boolean.class });
        m.makePublic();
        code = m.getCode(true);

        code.anew().setType(bc);
        code.dup();
        cons = findComparatorConstructor(type);
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.