yangys
2024-04-15 f2531a5dd1cac34553eeeb6cb847c706ccd7e014
smart-core-tool/src/main/java/com/qianwen/core/tool/beans/BladeBeanMap.java
@@ -6,10 +6,9 @@
import org.springframework.cglib.core.AbstractClassGenerator;
import org.springframework.cglib.core.ReflectUtils;
/* loaded from: blade-core-tool-9.3.0.0-SNAPSHOT.jar:org/springblade/core/tool/beans/BladeBeanMap.class */
public abstract class BladeBeanMap extends BeanMap {
    /* renamed from: newInstance */
    public abstract BladeBeanMap m4newInstance(Object o);
   public abstract BladeBeanMap newInstance(Object paramObject);
    protected BladeBeanMap() {
    }
@@ -24,59 +23,59 @@
        return gen.create();
    }
    /* loaded from: blade-core-tool-9.3.0.0-SNAPSHOT.jar:org/springblade/core/tool/beans/BladeBeanMap$BladeGenerator.class */
    public static class BladeGenerator extends AbstractClassGenerator {
        private static final AbstractClassGenerator.Source SOURCE = new AbstractClassGenerator.Source(BladeBeanMap.class.getName());
        private Object bean;
        private Class beanClass;
        private int require;
        public BladeGenerator() {
            super(SOURCE);
          super(SOURCE);
        }
        public void setBean(Object bean) {
            this.bean = bean;
            if (bean != null) {
                this.beanClass = bean.getClass();
            }
          this.bean = bean;
          if (bean != null)
            this.beanClass = bean.getClass();
        }
        public void setBeanClass(Class beanClass) {
            this.beanClass = beanClass;
          this.beanClass = beanClass;
        }
        public void setRequire(int require) {
            this.require = require;
          this.require = require;
        }
        protected ClassLoader getDefaultClassLoader() {
            return this.beanClass.getClassLoader();
          return this.beanClass.getClassLoader();
        }
        protected ProtectionDomain getProtectionDomain() {
            return ReflectUtils.getProtectionDomain(this.beanClass);
          return ReflectUtils.getProtectionDomain(this.beanClass);
        }
        public BladeBeanMap create() {
            if (this.beanClass == null) {
                throw new IllegalArgumentException("Class of bean unknown");
            }
            setNamePrefix(this.beanClass.getName());
            BladeBeanMapKey key = new BladeBeanMapKey(this.beanClass, this.require);
            return (BladeBeanMap) super.create(key);
          if (this.beanClass == null)
            throw new IllegalArgumentException("Class of bean unknown");
          setNamePrefix(this.beanClass.getName());
          BladeBeanMapKey key = new BladeBeanMapKey(this.beanClass, this.require);
          return (BladeBeanMap)create(key);
        }
        public void generateClass(ClassVisitor v) throws Exception {
            new BladeBeanMapEmitter(v, getClassName(), this.beanClass, this.require);
          new BladeBeanMapEmitter(v, getClassName(), this.beanClass, this.require);
        }
        protected Object firstInstance(Class type) {
            return ((BeanMap) ReflectUtils.newInstance(type)).newInstance(this.bean);
          return ((BeanMap)ReflectUtils.newInstance(type)).newInstance(this.bean);
        }
        protected Object nextInstance(Object instance) {
            return ((BeanMap) instance).newInstance(this.bean);
          return ((BeanMap)instance).newInstance(this.bean);
        }
    }
      }
}