Examples of addGetstatic()


Examples of javassist.bytecode.Bytecode.addGetstatic()

        minfo.setAccessFlags(Modifier.PUBLIC);      // cons.getModifiers() & ~Modifier.NATIVE
        setThrows(minfo, cp, cons.getExceptionTypes());
        Bytecode code = new Bytecode(cp, 0, 0);

        code.addAload(0);
        code.addGetstatic(thisClassName, DEFAULT_INTERCEPTOR, HANDLER_TYPE);
        code.addOpcode(Opcode.DUP);
        code.addOpcode(Opcode.IFNONNULL);
        code.addIndex(7);
        code.addOpcode(Opcode.POP);
        code.addGetstatic(NULL_INTERCEPTOR_HOLDER, DEFAULT_INTERCEPTOR, HANDLER_TYPE);
View Full Code Here

Examples of javassist.bytecode.Bytecode.addGetstatic()

        code.addGetstatic(thisClassName, DEFAULT_INTERCEPTOR, HANDLER_TYPE);
        code.addOpcode(Opcode.DUP);
        code.addOpcode(Opcode.IFNONNULL);
        code.addIndex(7);
        code.addOpcode(Opcode.POP);
        code.addGetstatic(NULL_INTERCEPTOR_HOLDER, DEFAULT_INTERCEPTOR, HANDLER_TYPE);
        code.addPutfield(thisClassName, HANDLER, HANDLER_TYPE);

        code.addAload(0);
        int s = addLoadParameters(code, cons.getParameterTypes(), 1);
        code.addInvokespecial(superClass.getName(), "<init>", desc);
View Full Code Here

Examples of javassist.bytecode.Bytecode.addGetstatic()

         *                methods[index * 2 + 1], $args);
         */
        int origIndex = index * 2;
        int delIndex = index * 2 + 1;
        int arrayVar = args + 1;
        code.addGetstatic(thisClassName, HOLDER, HOLDER_TYPE);
        code.addAstore(arrayVar);
        code.addAload(arrayVar);
        code.addIconst(origIndex);
        code.addOpcode(Opcode.AALOAD);
        code.addOpcode(Opcode.IFNONNULL);
View Full Code Here

Examples of javassist.bytecode.Bytecode.addGetstatic()

* @author Stuart Douglas <stuart.w.douglas@gmail.com>
*/
public class PrintLn {
    public static Bytecode println(ConstPool cp, String message) {
        Bytecode proxyBytecode = new Bytecode(cp);
        proxyBytecode.addGetstatic("java/lang/System", "out", "Ljava/io/PrintStream;");
        proxyBytecode.addLdc(message);
        proxyBytecode.addInvokevirtual("java.io.PrintStream", "println", "(Ljava/lang/String;)V");
        return proxyBytecode;
    }

View Full Code Here

Examples of javassist.bytecode.Bytecode.addGetstatic()

/* 1060 */     setThrows(minfo, cp, cons.getExceptionTypes());
/* 1061 */     Bytecode code = new Bytecode(cp, 0, 0);
/*      */
/* 1066 */     if (doHandlerInit) {
/* 1067 */       code.addAload(0);
/* 1068 */       code.addGetstatic(thisClassName, "default_interceptor", HANDLER_TYPE);
/* 1069 */       code.addPutfield(thisClassName, "handler", HANDLER_TYPE);
/* 1070 */       code.addGetstatic(thisClassName, "default_interceptor", HANDLER_TYPE);
/* 1071 */       code.addOpcode(199);
/* 1072 */       code.addIndex(10);
/*      */     }
View Full Code Here

Examples of javassist.bytecode.Bytecode.addGetstatic()

/*      */
/* 1066 */     if (doHandlerInit) {
/* 1067 */       code.addAload(0);
/* 1068 */       code.addGetstatic(thisClassName, "default_interceptor", HANDLER_TYPE);
/* 1069 */       code.addPutfield(thisClassName, "handler", HANDLER_TYPE);
/* 1070 */       code.addGetstatic(thisClassName, "default_interceptor", HANDLER_TYPE);
/* 1071 */       code.addOpcode(199);
/* 1072 */       code.addIndex(10);
/*      */     }
/*      */
/* 1076 */     code.addAload(0);
View Full Code Here

Examples of javassist.bytecode.Bytecode.addGetstatic()

/* 1071 */       code.addOpcode(199);
/* 1072 */       code.addIndex(10);
/*      */     }
/*      */
/* 1076 */     code.addAload(0);
/* 1077 */     code.addGetstatic("javassist.util.proxy.RuntimeSupport", "default_interceptor", HANDLER_TYPE);
/* 1078 */     code.addPutfield(thisClassName, "handler", HANDLER_TYPE);
/* 1079 */     int pc = code.currentPc();
/*      */
/* 1081 */     code.addAload(0);
/* 1082 */     int s = addLoadParameters(code, cons.getParameterTypes(), 1);
View Full Code Here

Examples of javassist.bytecode.Bytecode.addGetstatic()

/* 1128 */     Bytecode code = new Bytecode(cp, 0, args + 2);
/*      */
/* 1140 */     int origIndex = index * 2;
/* 1141 */     int delIndex = index * 2 + 1;
/* 1142 */     int arrayVar = args + 1;
/* 1143 */     code.addGetstatic(thisClassName, "_methods_", "[Ljava/lang/reflect/Method;");
/* 1144 */     code.addAstore(arrayVar);
/*      */
/* 1146 */     callFind2Methods(code, meth.getName(), delegatorName, origIndex, desc, arrayVar);
/*      */
/* 1148 */     code.addAload(0);
View Full Code Here

Examples of javassist.bytecode.Bytecode.addGetstatic()

/* 170 */       MethodInfo minfo = new MethodInfo(cp, accName, accDesc);
/* 171 */       minfo.setAccessFlags(8);
/* 172 */       minfo.addAttribute(new SyntheticAttribute(cp));
/* 173 */       Bytecode code = new Bytecode(cp);
/* 174 */       if (is_static) {
/* 175 */         code.addGetstatic(Bytecode.THIS, fieldName, fieldType);
/*     */       }
/*     */       else {
/* 178 */         code.addAload(0);
/* 179 */         code.addGetfield(Bytecode.THIS, fieldName, fieldType);
/* 180 */         code.setMaxLocals(1);
View Full Code Here

Examples of javassist.bytecode.Bytecode.addGetstatic()

/* 234 */       if ((finfo.getAccessFlags() & 0x8) == 0) {
/* 235 */         code.addAload(0);
/* 236 */         code.addGetfield(Bytecode.THIS, fieldName, fieldType);
/*     */       }
/*     */       else {
/* 239 */         code.addGetstatic(Bytecode.THIS, fieldName, fieldType);
/*     */       }
/* 241 */       code.addReturn(field.getType());
/*     */     }
/*     */     catch (NotFoundException e) {
/* 244 */       throw new CannotCompileException(e);
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.