Examples of ObjectSwitchCallback


Examples of net.sf.cglib.core.ObjectSwitchCallback

/*     */     throws Exception
/*     */   {
/* 173 */     CodeEmitter e = begin_method(1, PROVIDER_GET, null, null);
/* 174 */     e.load_this();
/* 175 */     e.load_arg(0);
/* 176 */     EmitUtils.string_switch(e, names, 1, new ObjectSwitchCallback(e) {
/*     */       public void processCase(Object key, Label end) {
/* 178 */         Type type = (Type)FieldProviderTransformer.this.fields.get(key);
/* 179 */         this.val$e.getfield((String)key);
/* 180 */         this.val$e.box(type);
/* 181 */         this.val$e.return_value();
View Full Code Here

Examples of net.sf.cglib.core.ObjectSwitchCallback

/*     */   private void setField(String[] names) throws Exception {
/* 191 */     CodeEmitter e = begin_method(1, PROVIDER_SET, null, null);
/* 192 */     e.load_this();
/* 193 */     e.load_arg(1);
/* 194 */     e.load_arg(0);
/* 195 */     EmitUtils.string_switch(e, names, 1, new ObjectSwitchCallback(e) {
/*     */       public void processCase(Object key, Label end) {
/* 197 */         Type type = (Type)FieldProviderTransformer.this.fields.get(key);
/* 198 */         this.val$e.unbox(type);
/* 199 */         this.val$e.putfield((String)key);
/* 200 */         this.val$e.return_value();
View Full Code Here

Examples of net.sf.cglib.core.ObjectSwitchCallback

/* 101 */     CodeEmitter e = begin_method(1, BEAN_MAP_GET, null, null);
/* 102 */     e.load_arg(0);
/* 103 */     e.checkcast(Type.getType(type));
/* 104 */     e.load_arg(1);
/* 105 */     e.checkcast(Constants.TYPE_STRING);
/* 106 */     EmitUtils.string_switch(e, getNames(getters), 1, new ObjectSwitchCallback(getters, e) {
/*     */       public void processCase(Object key, Label end) {
/* 108 */         PropertyDescriptor pd = (PropertyDescriptor)this.val$getters.get(key);
/* 109 */         MethodInfo method = ReflectUtils.getMethodInfo(pd.getReadMethod());
/* 110 */         this.val$e.invoke(method);
/* 111 */         this.val$e.box(method.getSignature().getReturnType());
View Full Code Here

Examples of net.sf.cglib.core.ObjectSwitchCallback

/* 123 */     CodeEmitter e = begin_method(1, BEAN_MAP_PUT, null, null);
/* 124 */     e.load_arg(0);
/* 125 */     e.checkcast(Type.getType(type));
/* 126 */     e.load_arg(1);
/* 127 */     e.checkcast(Constants.TYPE_STRING);
/* 128 */     EmitUtils.string_switch(e, getNames(setters), 1, new ObjectSwitchCallback(setters, e) {
/*     */       public void processCase(Object key, Label end) {
/* 130 */         PropertyDescriptor pd = (PropertyDescriptor)this.val$setters.get(key);
/* 131 */         if (pd.getReadMethod() == null) {
/* 132 */           this.val$e.aconst_null();
/*     */         } else {
View Full Code Here

Examples of net.sf.cglib.core.ObjectSwitchCallback

/*     */   }
/*     */
/*     */   private void generateGetPropertyType(Map allProps, String[] allNames) {
/* 177 */     CodeEmitter e = begin_method(1, GET_PROPERTY_TYPE, null, null);
/* 178 */     e.load_arg(0);
/* 179 */     EmitUtils.string_switch(e, allNames, 1, new ObjectSwitchCallback(allProps, e) {
/*     */       public void processCase(Object key, Label end) {
/* 181 */         PropertyDescriptor pd = (PropertyDescriptor)this.val$allProps.get(key);
/* 182 */         EmitUtils.load_class(this.val$e, Type.getType(pd.getPropertyType()));
/* 183 */         this.val$e.return_value();
/*     */       }
View Full Code Here

Examples of net.sf.cglib.core.ObjectSwitchCallback

/*     */   public void generateFindProxy(ClassEmitter ce, Map sigMap) {
/* 174 */     CodeEmitter e = ce.begin_method(9, FIND_PROXY, null, null);
/*     */
/* 178 */     e.load_arg(0);
/* 179 */     e.invoke_virtual(Constants.TYPE_OBJECT, TO_STRING);
/* 180 */     ObjectSwitchCallback callback = new ObjectSwitchCallback(e, sigMap) {
/*     */       public void processCase(Object key, Label end) {
/* 182 */         this.val$e.getfield((String)this.val$sigMap.get(key));
/* 183 */         this.val$e.return_value();
/*     */       }
/*     */       public void processDefault() {
View Full Code Here

Examples of net.sf.cglib.core.ObjectSwitchCallback

/*     */     }
/* 143 */     e.end_method();
/*     */   }
/*     */
/*     */   private void signatureSwitchHelper(CodeEmitter e, List signatures) {
/* 147 */     ObjectSwitchCallback callback = new ObjectSwitchCallback(e, signatures)
/*     */     {
/*     */       public void processCase(Object key, Label end) {
/* 150 */         this.val$e.push(this.val$signatures.indexOf(key));
/* 151 */         this.val$e.return_value();
/*     */       }
View Full Code Here

Examples of net.sf.cglib.core.ObjectSwitchCallback

/*  842 */     e.load_arg(2);
/*  843 */     e.invoke_static_this(SET_THREAD_CALLBACKS);
/*  844 */     e.new_instance_this();
/*  845 */     e.dup();
/*  846 */     e.load_arg(0);
/*  847 */     EmitUtils.constructor_switch(e, constructors, new ObjectSwitchCallback(e) {
/*      */       public void processCase(Object key, Label end) {
/*  849 */         MethodInfo constructor = (MethodInfo)key;
/*  850 */         Type[] types = constructor.getSignature().getArgumentTypes();
/*  851 */         for (int i = 0; i < types.length; i++) {
/*  852 */           this.val$e.load_arg(1);
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.