/** Map with String keys and Object values. */ privatefinal Map<String, Object> attributes = new LinkedHashMap<>();
@Nullable private Object source;
/** * Constant for the default scope name: {@code ""}, equivalent to singleton * status unless overridden from a parent bean definition (if applicable). * 默认bean作用域 */ publicstaticfinal String SCOPE_DEFAULT = "";
/** * Constant that indicates no external autowiring at all. * 自动注入模式 * @see #setAutowireMode */ publicstaticfinalint AUTOWIRE_NO = AutowireCapableBeanFactory.AUTOWIRE_NO;
/** * Constant that indicates autowiring bean properties by name. * 自动注入通过bean名字 * @see #setAutowireMode */ publicstaticfinalint AUTOWIRE_BY_NAME = AutowireCapableBeanFactory.AUTOWIRE_BY_NAME;
/** * Constant that indicates autowiring bean properties by type. * 自动注入通过bean类型 * @see #setAutowireMode */ publicstaticfinalint AUTOWIRE_BY_TYPE = AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE;
/** * Constant that indicates autowiring a constructor. * 自动注入通过构造函数 * @see #setAutowireMode */ publicstaticfinalint 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 publicstaticfinalint AUTOWIRE_AUTODETECT = AutowireCapableBeanFactory.AUTOWIRE_AUTODETECT;
/** * Constant that indicates no dependency check at all. * @see #setDependencyCheck */ publicstaticfinalint DEPENDENCY_CHECK_NONE = 0;
/** * Constant that indicates dependency checking for object references. * @see #setDependencyCheck */ publicstaticfinalint DEPENDENCY_CHECK_OBJECTS = 1;
/** * Constant that indicates dependency checking for all properties * (object references as well as "simple" properties). * @see #setDependencyCheck */ publicstaticfinalint 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. */ publicstaticfinal String INFER_METHOD = "(inferred)";
/** Determines if the definition needs to be re-merged. */ volatileboolean stale;
boolean allowCaching = true;
boolean isFactoryMethodUnique = false;
@Nullable volatile ResolvableType targetType;
/** Package-visible field for caching the determined Class of a given bean definition. */ @Nullable volatile Class<?> resolvedTargetType;
/** Package-visible field for caching if the bean is a factory bean. */ @Nullable volatile Boolean isFactoryBean;
/** Package-visible field for caching the return type of a generically typed factory method. */ @Nullable volatile ResolvableType factoryMethodReturnType;
/** Package-visible field for caching a unique factory method candidate for introspection. */ @Nullable volatile Method factoryMethodToIntrospect;
/** Common lock for the four constructor fields below. */ final Object constructorArgumentLock = new Object();
/** Package-visible field for caching the resolved constructor or factory method. */ @Nullable Executable resolvedConstructorOrFactoryMethod;
/** Package-visible field that marks the constructor arguments as resolved. */ boolean constructorArgumentsResolved = false;
/** Package-visible field for caching fully resolved constructor arguments. */ @Nullable Object[] resolvedConstructorArguments;
/** Package-visible field for caching partly prepared constructor arguments. */ @Nullable Object[] preparedConstructorArguments;
/** Common lock for the two post-processing fields below. */ final Object postProcessingLock = new Object();
/** Package-visible field that indicates MergedBeanDefinitionPostProcessor having been applied. */ boolean postProcessed = false;
/** Package-visible field that indicates a before-instantiation post-processor having kicked in. */ @Nullable volatile Boolean beforeInstantiationResolved;