Package net.sf.cglib.asm

Examples of net.sf.cglib.asm.Type


        return classLoader == null ? ClassLoaderUtil.getContextClassLoader() : classLoader;
    }

    protected Signature getSignature(Method method, String rename) {
        String name = defaultIfNull(trimToNull(rename), method.getName());
        Type returnType = Type.getType(method.getReturnType());
        Type[] paramTypes = Type.getArgumentTypes(method);

        return new Signature(name, returnType, paramTypes);
    }
View Full Code Here


        return this;
    }

    private Signature getSignature(Method method, String rename) {
        String name = defaultIfNull(trimToNull(rename), method.getName());
        Type returnType = Type.getType(method.getReturnType());
        Type[] paramTypes = Type.getArgumentTypes(method);

        return new Signature(name, returnType, paramTypes);
    }
View Full Code Here

        return this;
    }

    private Signature getSignature(Method method, String rename) {
        String name = defaultIfNull(trimToNull(rename), method.getName());
        Type returnType = Type.getType(method.getReturnType());
        Type[] paramTypes = Type.getArgumentTypes(method);

        return new Signature(name, returnType, paramTypes);
    }
View Full Code Here

/* 51 */     e.super_invoke_constructor();
/* 52 */     e.load_this();
/* 53 */     e.load_arg(0);
/* 54 */     e.super_putfield("a", Constants.TYPE_OBJECT_ARRAY);
/* 55 */     for (int i = 0; i < arrays.length; i++) {
/* 56 */       Type type = Type.getType(arrays[i].getClass());
/* 57 */       declare_field(2, getFieldName(i), type, null, null);
/* 58 */       e.load_this();
/* 59 */       e.load_arg(0);
/* 60 */       e.push(i);
/* 61 */       e.aaload();
View Full Code Here

/*    */   }
/*    */
/*    */   private void generateSwap(Object[] arrays) {
/* 70 */     CodeEmitter e = begin_method(1, SWAP, null, null);
/* 71 */     for (int i = 0; i < arrays.length; i++) {
/* 72 */       Type type = Type.getType(arrays[i].getClass());
/* 73 */       Type component = TypeUtils.getComponentType(type);
/* 74 */       Local T = e.make_local(type);
/*    */
/* 76 */       e.load_this();
/* 77 */       e.getfield(getFieldName(i));
/* 78 */       e.store_local(T);
View Full Code Here

/*     */   }
/*     */
/*     */   public CodeEmitter begin_method(int access, Signature sig, Type[] exceptions, Attribute attrs) {
/* 149 */     return new CodeEmitter(super.begin_method(access, sig, exceptions, attrs)) {
/*     */       public void visitFieldInsn(int opcode, String owner, String name, String desc) {
/* 151 */         Type towner = TypeUtils.fromInternalName(owner);
/* 152 */         switch (opcode) {
/*     */         case 180:
/* 154 */           if (!InterceptFieldTransformer.this.filter.acceptRead(towner, name)) break;
/* 155 */           helper(towner, InterceptFieldTransformer.access$100(name, desc));
/* 156 */           return;
View Full Code Here

/*     */   private static Signature writeMethodSig(String name, String desc) {
/* 180 */     return new Signature("$cglib_write_" + name, "(" + desc + ")V");
/*     */   }
/*     */
/*     */   private static Signature readCallbackSig(Type type) {
/* 184 */     Type remap = remap(type);
/* 185 */     return new Signature("read" + callbackName(remap), remap, new Type[] { Constants.TYPE_OBJECT, Constants.TYPE_STRING, remap });
/*     */   }
View Full Code Here

/* 185 */     return new Signature("read" + callbackName(remap), remap, new Type[] { Constants.TYPE_OBJECT, Constants.TYPE_STRING, remap });
/*     */   }
/*     */
/*     */   private static Signature writeCallbackSig(Type type)
/*     */   {
/* 193 */     Type remap = remap(type);
/* 194 */     return new Signature("write" + callbackName(remap), remap, new Type[] { Constants.TYPE_OBJECT, Constants.TYPE_STRING, remap, remap });
/*     */   }
View Full Code Here

/* 107 */     e.newarray(Constants.TYPE_CLASS);
/* 108 */     e.dup();
/* 109 */     for (int i = 0; i < names.length; i++) {
/* 110 */       e.dup();
/* 111 */       e.push(i);
/* 112 */       Type type = (Type)this.fields.get(names[i]);
/* 113 */       EmitUtils.load_class(e, type);
/* 114 */       e.aastore();
/*     */     }
/* 116 */     e.putstatic(getClassType(), "CGLIB$FIELD_TYPES", Constants.TYPE_CLASS_ARRAY);
/*     */   }
View Full Code Here

/* 135 */     e.load_this();
/* 136 */     e.load_arg(1);
/* 137 */     e.load_arg(0);
/* 138 */     e.process_switch(indexes, new ProcessSwitchCallback(names, e) {
/*     */       public void processCase(int key, Label end) throws Exception {
/* 140 */         Type type = (Type)FieldProviderTransformer.this.fields.get(this.val$names[key]);
/* 141 */         this.val$e.unbox(type);
/* 142 */         this.val$e.putfield(this.val$names[key]);
/* 143 */         this.val$e.return_value();
/*     */       }
/*     */       public void processDefault() throws Exception {
View Full Code Here

TOP

Related Classes of net.sf.cglib.asm.Type

Copyright © 2018 www.massapicom. 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.