BeanDefinition封装的信息

来源:互联网 发布:sql 按月分组 编辑:程序博客网 时间:2024/06/16 18:12
public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccessor        implements BeanDefinition, Cloneable {    /**     * Constant for the default scope name: {@code ""}, equivalent to singleton     * status unless overridden from a parent bean definition (if applicable).     */    public static final String SCOPE_DEFAULT = "";    /**     * Constant that indicates no autowiring at all.     * @see #setAutowireMode     */    public static final int AUTOWIRE_NO = AutowireCapableBeanFactory.AUTOWIRE_NO;    /**     * Constant that indicates autowiring bean properties by name.     * @see #setAutowireMode     */    public static final int AUTOWIRE_BY_NAME = AutowireCapableBeanFactory.AUTOWIRE_BY_NAME;    /**     * Constant that indicates autowiring bean properties by type.     * @see #setAutowireMode     */    public static final int AUTOWIRE_BY_TYPE = AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE;    /**     * Constant that indicates autowiring a constructor.     * @see #setAutowireMode     */    public static final int AUTOWIRE_CONSTRUCTOR = AutowireCapableBeanFactory.AUTOWIRE_CONSTRUCTOR;    /**     * Constant that indicates determining an appropriate autowire strategy     * through introspection of the bean class.     * @see #setAutowireMode     * @deprecated as of Spring 3.0: If you are using mixed autowiring strategies,     * use annotation-based autowiring for clearer demarcation of autowiring needs.     */    @Deprecated    public static final int AUTOWIRE_AUTODETECT = AutowireCapableBeanFactory.AUTOWIRE_AUTODETECT;    /**     * Constant that indicates no dependency check at all.     * @see #setDependencyCheck     */    public static final int DEPENDENCY_CHECK_NONE = 0;    /**     * Constant that indicates dependency checking for object references.     * @see #setDependencyCheck     */    public static final int DEPENDENCY_CHECK_OBJECTS = 1;    /**     * Constant that indicates dependency checking for "simple" properties.     * @see #setDependencyCheck     * @see org.springframework.beans.BeanUtils#isSimpleProperty     */    public static final int DEPENDENCY_CHECK_SIMPLE = 2;    /**     * Constant that indicates dependency checking for all properties     * (object references as well as "simple" properties).     * @see #setDependencyCheck     */    public static final int DEPENDENCY_CHECK_ALL = 3;    /**     * Constant that indicates the container should attempt to infer the     * {@link #setDestroyMethodName destroy method name} for a bean as opposed to     * explicit specification of a method name. The value {@value} is specifically     * designed to include characters otherwise illegal in a method name, ensuring     * no possibility of collisions with legitimately named methods having the same     * name.     * <p>Currently, the method names detected during destroy method inference     * are "close" and "shutdown", if present on the specific bean class.     */    public static final String INFER_METHOD = "(inferred)";    private volatile Object beanClass;    private String scope = SCOPE_DEFAULT;    private boolean abstractFlag = false;    private boolean lazyInit = false;    private int autowireMode = AUTOWIRE_NO;    private int dependencyCheck = DEPENDENCY_CHECK_NONE;    private String[] dependsOn;    private boolean autowireCandidate = true;    private boolean primary = false;    private final Map<String, AutowireCandidateQualifier> qualifiers =            new LinkedHashMap<String, AutowireCandidateQualifier>(0);    private boolean nonPublicAccessAllowed = true;    private boolean lenientConstructorResolution = true;    private ConstructorArgumentValues constructorArgumentValues;    private MutablePropertyValues propertyValues;    private MethodOverrides methodOverrides = new MethodOverrides();    private String factoryBeanName;    private String factoryMethodName;    private String initMethodName;    private String destroyMethodName;    private boolean enforceInitMethod = true;    private boolean enforceDestroyMethod = true;    private boolean synthetic = false;    private int role = BeanDefinition.ROLE_APPLICATION;    private String description;    private Resource resource;}
public interface BeanDefinition extends AttributeAccessor, BeanMetadataElement {    /**     * Scope identifier for the standard singleton scope: "singleton".     * <p>Note that extended bean factories might support further scopes.     * @see #setScope     */    String SCOPE_SINGLETON = ConfigurableBeanFactory.SCOPE_SINGLETON;    /**     * Scope identifier for the standard prototype scope: "prototype".     * <p>Note that extended bean factories might support further scopes.     * @see #setScope     */    String SCOPE_PROTOTYPE = ConfigurableBeanFactory.SCOPE_PROTOTYPE;    /**     * Role hint indicating that a {@code BeanDefinition} is a major part     * of the application. Typically corresponds to a user-defined bean.     */    int ROLE_APPLICATION = 0;    /**     * Role hint indicating that a {@code BeanDefinition} is a supporting     * part of some larger configuration, typically an outer     * {@link org.springframework.beans.factory.parsing.ComponentDefinition}.     * {@code SUPPORT} beans are considered important enough to be aware     * of when looking more closely at a particular     * {@link org.springframework.beans.factory.parsing.ComponentDefinition},     * but not when looking at the overall configuration of an application.     */    int ROLE_SUPPORT = 1;    /**     * Role hint indicating that a {@code BeanDefinition} is providing an     * entirely background role and has no relevance to the end-user. This hint is     * used when registering beans that are completely part of the internal workings     * of a {@link org.springframework.beans.factory.parsing.ComponentDefinition}.     */    int ROLE_INFRASTRUCTURE = 2;}
0 0
原创粉丝点击