Package net.sf.cglib.core

Examples of net.sf.cglib.core.CodeEmitter.push()


/* 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();
/* 62 */       e.checkcast(type);
/* 63 */       e.putfield(getFieldName(i));
/*    */     }
/* 65 */     e.return_value();
View Full Code Here


/* 101 */     Local result = e.make_local(type);
/* 102 */     e.store_local(result);
/* 103 */     e.load_this();
/* 104 */     e.invoke_interface(ENABLED, ENABLED_GET);
/* 105 */     e.load_this();
/* 106 */     e.push(name);
/* 107 */     e.load_local(result);
/* 108 */     e.invoke_interface(CALLBACK, readCallbackSig(type));
/* 109 */     if (!TypeUtils.isPrimitive(type)) {
/* 110 */       e.checkcast(type);
/*     */     }
View Full Code Here

/* 125 */     e.ifnull(skip);
/*     */
/* 127 */     e.load_this();
/* 128 */     e.invoke_interface(ENABLED, ENABLED_GET);
/* 129 */     e.load_this();
/* 130 */     e.push(name);
/* 131 */     e.load_this();
/* 132 */     e.getfield(name);
/* 133 */     e.load_arg(0);
/* 134 */     e.invoke_interface(CALLBACK, writeCallbackSig(type));
/* 135 */     if (!TypeUtils.isPrimitive(type)) {
View Full Code Here

/*     */   private void initFieldProvider(String[] names) {
/* 102 */     CodeEmitter e = getStaticHook();
/* 103 */     EmitUtils.push_object(e, names);
/* 104 */     e.putstatic(getClassType(), "CGLIB$FIELD_NAMES", Constants.TYPE_STRING_ARRAY);
/*     */
/* 106 */     e.push(names.length);
/* 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);
View Full Code Here

/* 106 */     e.push(names.length);
/* 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

/* 137 */             e.load_arg(2);
/* 138 */             e.load_local(sourceLocal);
/* 139 */             e.invoke(read);
/* 140 */             e.box(read.getSignature().getReturnType());
/* 141 */             EmitUtils.load_class(e, setterType);
/* 142 */             e.push(write.getSignature().getName());
/* 143 */             e.invoke_interface(BeanCopier.CONVERTER, BeanCopier.CONVERT);
/* 144 */             e.unbox_or_zero(setterType);
/* 145 */             e.invoke(write);
/* 146 */           } else if (compatible(getter, setter)) {
/* 147 */             e.dup2();
View Full Code Here

/*     */   private void generateSet(Class target, Method[] setters)
/*     */   {
/*  82 */     CodeEmitter e = begin_method(1, SET_PROPERTY_VALUES, null, null);
/*  83 */     if (setters.length > 0) {
/*  84 */       Local index = e.make_local(Type.INT_TYPE);
/*  85 */       e.push(0);
/*  86 */       e.store_local(index);
/*  87 */       e.load_arg(0);
/*  88 */       e.checkcast(Type.getType(target));
/*  89 */       e.load_arg(1);
/*  90 */       Block handler = e.begin_block();
View Full Code Here

/*  63 */       e.store_local(bean);
/*  64 */       for (int i = 0; i < getters.length; i++) {
/*  65 */         if (getters[i] != null) {
/*  66 */           MethodInfo getter = ReflectUtils.getMethodInfo(getters[i]);
/*  67 */           e.load_arg(1);
/*  68 */           e.push(i);
/*  69 */           e.load_local(bean);
/*  70 */           e.invoke(getter);
/*  71 */           e.box(getter.getSignature().getReturnType());
/*  72 */           e.aastore();
/*     */         }
View Full Code Here

/*  706 */       seenNull = (seenNull) || (sig.getDescriptor().equals("()V"));
/*  707 */       e.super_invoke_constructor(sig);
/*  708 */       e.invoke_static_this(BIND_CALLBACKS);
/*  709 */       if (!this.interceptDuringConstruction) {
/*  710 */         e.load_this();
/*  711 */         e.push(1);
/*  712 */         e.putfield("CGLIB$CONSTRUCTED");
/*      */       }
/*  714 */       e.return_value();
/*  715 */       e.end_method();
/*      */     }
View Full Code Here

/*      */   private void emitGetCallbacks(ClassEmitter ce) {
/*  784 */     CodeEmitter e = ce.begin_method(1, GET_CALLBACKS, null, null);
/*  785 */     e.load_this();
/*  786 */     e.invoke_static_this(BIND_CALLBACKS);
/*  787 */     e.load_this();
/*  788 */     e.push(this.callbackTypes.length);
/*  789 */     e.newarray(CALLBACK);
/*  790 */     for (int i = 0; i < this.callbackTypes.length; i++) {
/*  791 */       e.dup();
/*  792 */       e.push(i);
/*  793 */       e.load_this();
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.