Examples of CtPrimitiveType


Examples of javassist.CtPrimitiveType

/*     */
/* 651 */     if (this.exprType == 344) {
/* 652 */       throw new CompileError("invalid type for " + this.returnCastName);
/*     */     }
/* 654 */     if ((type instanceof CtPrimitiveType)) {
/* 655 */       CtPrimitiveType pt = (CtPrimitiveType)type;
/*     */
/* 657 */       String wrapper = pt.getWrapperName();
/* 658 */       code.addCheckcast(wrapper);
/* 659 */       code.addInvokevirtual(wrapper, pt.getGetMethodName(), pt.getGetMethodDescriptor());
/*     */
/* 661 */       setType(type);
/*     */     }
/*     */     else {
/* 664 */       code.addCheckcast(type);
View Full Code Here

Examples of javassist.CtPrimitiveType

/* 673 */     setType(type, 0);
/*     */   }
/*     */
/*     */   private void setType(CtClass type, int dim) throws CompileError {
/* 677 */     if (type.isPrimitive()) {
/* 678 */       CtPrimitiveType pt = (CtPrimitiveType)type;
/* 679 */       this.exprType = MemberResolver.descToType(pt.getDescriptor());
/* 680 */       this.arrayDim = dim;
/* 681 */       this.className = null;
/*     */     }
/* 683 */     else if (type.isArray()) {
/*     */       try {
View Full Code Here

Examples of javassist.CtPrimitiveType

/*     */   public void doNumCast(CtClass type)
/*     */     throws CompileError
/*     */   {
/* 700 */     if ((this.arrayDim == 0) && (!isRefType(this.exprType)))
/* 701 */       if ((type instanceof CtPrimitiveType)) {
/* 702 */         CtPrimitiveType pt = (CtPrimitiveType)type;
/* 703 */         atNumCastExpr(this.exprType, MemberResolver.descToType(pt.getDescriptor()));
/*     */       }
/*     */       else
/*     */       {
/* 707 */         throw new CompileError("type mismatch");
/*     */       }
View Full Code Here

Examples of javassist.CtPrimitiveType

     */
    public void addReturn(CtClass type) {
        if (type == null)
            addOpcode(RETURN);
        else if (type.isPrimitive()) {
            CtPrimitiveType ptype = (CtPrimitiveType)type;
            addOpcode(ptype.getReturnOp());
        }
        else
            addOpcode(ARETURN);
    }
View Full Code Here

Examples of javassist.CtPrimitiveType

                desc.append(toJvmName(name.substring(0, name.length() - 2)));
                desc.append(';');
            }
        }
        else if (type.isPrimitive()) {
            CtPrimitiveType pt = (CtPrimitiveType)type;
            desc.append(pt.getDescriptor());
        }
        else { // class type
            desc.append('L');
            desc.append(type.getName().replace('.', '/'));
            desc.append(';');
View Full Code Here

Examples of javassist.CtPrimitiveType

               buffer.append('[');
               temp = temp.getComponentType();
            }
            if (temp.isPrimitive())
            {
               CtPrimitiveType primitive = (CtPrimitiveType) temp;
               buffer.append(Character.toString(primitive.getDescriptor()));
            }
            else
            {
               buffer.append('L');
               buffer.append(temp.getName());
View Full Code Here

Examples of org.hotswap.agent.javassist.CtPrimitiveType

                String name = type.getName();
                desc.append(toJvmName(name.substring(0, name.length() - 2)));
                desc.append(';');
            }
        } else if (type.isPrimitive()) {
            CtPrimitiveType pt = (CtPrimitiveType) type;
            desc.append(pt.getDescriptor());
        } else { // class type
            desc.append('L');
            desc.append(type.getName().replace('.', '/'));
            desc.append(';');
        }
View Full Code Here

Examples of org.jboss.forge.furnace.proxy.javassist.CtPrimitiveType

     */
    public void addReturn(CtClass type) {
        if (type == null)
            addOpcode(RETURN);
        else if (type.isPrimitive()) {
            CtPrimitiveType ptype = (CtPrimitiveType)type;
            addOpcode(ptype.getReturnOp());
        }
        else
            addOpcode(ARETURN);
    }
View Full Code Here

Examples of org.jboss.forge.furnace.proxy.javassist.CtPrimitiveType

    private static void makeDefaultBody(Bytecode b, CtClass type) {
        int op;
        int value;
        if (type instanceof CtPrimitiveType) {
            CtPrimitiveType pt = (CtPrimitiveType)type;
            op = pt.getReturnOp();
            if (op == Opcode.DRETURN)
                value = Opcode.DCONST_0;
            else if (op == Opcode.FRETURN)
                value = Opcode.FCONST_0;
            else if (op == Opcode.LRETURN)
View Full Code Here

Examples of org.jboss.forge.furnace.proxy.javassist.CtPrimitiveType

                desc.append(toJvmName(name.substring(0, name.length() - 2)));
                desc.append(';');
            }
        }
        else if (type.isPrimitive()) {
            CtPrimitiveType pt = (CtPrimitiveType)type;
            desc.append(pt.getDescriptor());
        }
        else { // class type
            desc.append('L');
            desc.append(type.getName().replace('.', '/'));
            desc.append(';');
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.