All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.blade.ioc.bean.BeanDefine Maven / Gradle / Ivy

There is a newer version: 2.0.15.RELEASE
Show newest version
package com.blade.ioc.bean;

/**
 * Bean Define, IOC to define a target
 *
 * @author biezhi
 * @since 1.5
 */
public class BeanDefine {

    private Object   bean;
    private Class type;
    private boolean  isSingleton;
    private boolean  fieldHasPrototype;

    public BeanDefine(Object bean) {
        this(bean, bean.getClass());
    }

    public BeanDefine(Object bean, Class type) {
        this.bean = bean;
        this.type = type;
        this.isSingleton = true;
    }

    public BeanDefine(Object bean, Class type, boolean isSingleton) {
        this.bean = bean;
        this.type = type;
        this.isSingleton = isSingleton;
    }

    public Object getBean() {
        return bean;
    }

    public void setBean(Object bean) {
        this.bean = bean;
    }

    public Class getType() {
        return type;
    }

    public void setType(Class type) {
        this.type = type;
    }

    public boolean isSingleton() {
        return isSingleton;
    }

    public void setSingleton(boolean isSingleton) {
        this.isSingleton = isSingleton;
    }

    public boolean isFieldHasPrototype() {
        return fieldHasPrototype;
    }

    public void setFieldHasPrototype(boolean fieldHasPrototype) {
        this.fieldHasPrototype = fieldHasPrototype;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy