Package javassist.compiler

Examples of javassist.compiler.Javac.recordParams()


        int retAddr = ca.getMaxLocals();
        Bytecode b = new Bytecode(pool, 0, retAddr + 1);
        b.setStackDepth(ca.getMaxStack() + 1);
        Javac jv = new Javac(b, declaringClass);
        try {
            int nvars = jv.recordParams(getParameterTypes(),
                                        Modifier.isStatic(getModifiers()));
            jv.recordParamNames(ca, nvars);
            CtClass rtype = getReturnType0();
            int varNo = jv.recordReturnType(rtype, true);
            jv.recordLocalVariables(ca, 0);
View Full Code Here


/* 205 */     CodeAttribute ca = this.iterator.get();
/*     */     try {
/* 207 */       CtClass[] params = Descriptor.getParameterTypes(signature, cp);
/* 208 */       CtClass retType = Descriptor.getReturnType(signature, cp);
/* 209 */       int paramVar = ca.getMaxLocals();
/* 210 */       jc.recordParams(classname, params, true, paramVar, withinStatic());
/*     */
/* 212 */       int retVar = jc.recordReturnType(retType, true);
/* 213 */       if (c == 184)
/* 214 */         jc.recordStaticProceed(classname, methodname);
/* 215 */       else if (c == 183) {
View Full Code Here

/* 211 */     CtClass[] params = new CtClass[dim];
/* 212 */     for (int i = 0; i < dim; i++) {
/* 213 */       params[i] = CtClass.intType;
/*     */     }
/* 215 */     int paramVar = ca.getMaxLocals();
/* 216 */     jc.recordParams("java.lang.Object", params, true, paramVar, withinStatic());
/*     */
/* 221 */     checkResultValue(retType, statement);
/* 222 */     int retVar = jc.recordReturnType(retType, true);
/* 223 */     jc.recordProceed(new ProceedForArray(retType, this.opcode, index, dim));
/*     */
View Full Code Here

/* 184 */     CodeAttribute ca = this.iterator.get();
/*     */     try {
/* 186 */       CtClass[] params = Descriptor.getParameterTypes(signature, cp);
/* 187 */       CtClass newType = cp.get(this.newTypeName);
/* 188 */       int paramVar = ca.getMaxLocals();
/* 189 */       jc.recordParams(this.newTypeName, params, true, paramVar, withinStatic());
/*     */
/* 191 */       int retVar = jc.recordReturnType(newType, true);
/* 192 */       jc.recordProceed(new ProceedForNew(newType, newIndex, methodIndex));
/*     */
/* 197 */       checkResultValue(newType, statement);
View Full Code Here

/* 100 */       CtClass[] params = { cp.get("java.lang.Object") };
/*     */
/* 102 */       CtClass retType = getType();
/*     */
/* 104 */       int paramVar = ca.getMaxLocals();
/* 105 */       jc.recordParams("java.lang.Object", params, true, paramVar, withinStatic());
/*     */
/* 107 */       int retVar = jc.recordReturnType(retType, true);
/* 108 */       jc.recordProceed(new ProceedForCast(index, retType));
/*     */
/* 112 */       checkResultValue(retType, statement);
View Full Code Here

/* 170 */         params[0] = fieldType;
/* 171 */         retType = CtClass.voidType;
/*     */       }
/*     */
/* 174 */       int paramVar = ca.getMaxLocals();
/* 175 */       jc.recordParams(constPool.getFieldrefClassName(index), params, true, paramVar, withinStatic());
/*     */
/* 180 */       boolean included = checkResultValue(retType, statement);
/* 181 */       if (read) {
/* 182 */         included = true;
/*     */       }
View Full Code Here

/* 103 */       CtClass[] params = { cp.get("java.lang.Object") };
/*     */
/* 105 */       CtClass retType = CtClass.booleanType;
/*     */
/* 107 */       int paramVar = ca.getMaxLocals();
/* 108 */       jc.recordParams("java.lang.Object", params, true, paramVar, withinStatic());
/*     */
/* 110 */       int retVar = jc.recordReturnType(retType, true);
/* 111 */       jc.recordProceed(new ProceedForInstanceof(index));
/*     */
/* 114 */       jc.recordType(getType());
View Full Code Here

/*  695 */       throw new CannotCompileException("no method body");
/*      */     }
/*  697 */     CodeIterator iterator = ca.iterator();
/*  698 */     Javac jv = new Javac(cc);
/*      */     try {
/*  700 */       int nvars = jv.recordParams(getParameterTypes(), Modifier.isStatic(getModifiers()));
/*      */
/*  702 */       jv.recordParamNames(ca, nvars);
/*  703 */       jv.recordLocalVariables(ca, 0);
/*  704 */       jv.recordType(getReturnType0());
/*  705 */       jv.compileStmnt(src);
View Full Code Here

/*  769 */     int retAddr = ca.getMaxLocals();
/*  770 */     Bytecode b = new Bytecode(pool, 0, retAddr + 1);
/*  771 */     b.setStackDepth(ca.getMaxStack() + 1);
/*  772 */     Javac jv = new Javac(b, cc);
/*      */     try {
/*  774 */       int nvars = jv.recordParams(getParameterTypes(), Modifier.isStatic(getModifiers()));
/*      */
/*  776 */       jv.recordParamNames(ca, nvars);
/*  777 */       CtClass rtype = getReturnType0();
/*  778 */       int varNo = jv.recordReturnType(rtype, true);
/*  779 */       jv.recordLocalVariables(ca, 0);
View Full Code Here

/* 1010 */     CodeIterator iterator = ca.iterator();
/* 1011 */     Bytecode b = new Bytecode(cp, ca.getMaxStack(), ca.getMaxLocals());
/* 1012 */     b.setStackDepth(1);
/* 1013 */     Javac jv = new Javac(b, cc);
/*      */     try {
/* 1015 */       jv.recordParams(getParameterTypes(), Modifier.isStatic(getModifiers()));
/*      */
/* 1017 */       int var = jv.recordVariable(exceptionType, exceptionName);
/* 1018 */       b.addAstore(var);
/* 1019 */       jv.compileStmnt(src);
/*      */
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.