/*** A beandefinition describes a bean instance, which have property values, * constructor argument values, and further I Nformation supplied by * concrete implementations. *beandefinition (The bean definition) Describes an instance of the bean, which has attribute values, constructors, and so on ... */ Public InterfaceBeandefinitionextendsAttributeaccessor, beanmetadataelement {/*** Scope identifier for the standard singleton scope: "Singleton". * <p>note that extended beans factories might support further scopes. The range representation of a standard singleton range is: singleton, meaning the meaning of the singleton pattern*/String Scope_singleton=Configurablebeanfactory.scope_singleton; /*** Scope identifier for the standard prototype scope: "Prototype". * <p>note that extended beans factories might support further scopes. Prototype Mode
*/String Scope_prototype=Configurablebeanfactory.scope_prototype; /*** Role hint indicating that a {@codeBeandefinition} is a major part * of the application. Typically corresponds to a user-defined bean.
Role hints indicate that Beandefinition is the main department*/ introle_application = 0; /*** Role hint indicating that a {@codeBeandefinition} is a supporting * part of the some larger configuration, typically an outer role hint proves that beandefinition is a Part of a larger configuration. is usually external configuration*/ intRole_support = 1; /*** Role hint indicating that a {@codeBeandefinition} is providing an * entirely background role and have no relevance to the end-user. This hint was * used when registering beans that was completely part of the internal workings * of a {@linkOrg.springframework.beans.factory.parsing.ComponentDefinition}.
When registering a bean, internal work is used*/ intRole_infrastructure = 2; //Modifiable Attributes /*** Set The name of the parent definition of this bean in the definition, if any.
Sets the name of the parent definition for this bean, if any*/ voidsetparentname (String parentname); /*** Return the name of the parent definition of this bean in the definition, if any.
Returns the name of the parent definition for this bean, if any*/String getparentname (); /*** Specify the Bean class name of this bean definition. * <p>the class name can be modified during Bean factory post-processing, * typically replacing the original clas s name with a parsed variant of it. Set the class name of the Bean*/ voidsetbeanclassname (String beanclassname); /*** Return The current bean class name of this bean definition. * <p>note that this does not has the actual class name used at runtime, in * Case of a child definition O Verriding/inheriting the class name from its parent. * Also, this could just be the Class A factory method was called on, or it may * even was empty in case of a factory Bean Reference. A method is called on. * Hence, do <i>not</i> consider the-the-definitive bean type at runtime and * Rather only use it fo R parsing purposes at the individual bean definition level. Returns the full class name of this bean. Note that this is not necessarily the actual class name used by the runtime*/String getbeanclassname (); /*** Override The target scope of this bean, specifying a new scope name. Overrides the target of this bean to return, specifying the new scope name*/ voidsetscope (String scope); /*** Return the name of the current target scope for this bean, returning the names of the currently targeted scopes of this bean*/String Getscope (); /*** Set Whether this bean should is lazily initialized. * <p>if {@codeFalse}, the bean would get instantiated on startup by Bean * Factories that perform eager initialization of singletons.
Sets whether this bean should be lazy to load*/ voidSetlazyinit (Booleanlazyinit); /*** Return Whether this bean should is lazily initialized, i.e. not * eagerly instantiated on startup. Only applicable to a singleton bean.
Returns whether this bean should be lazy to load, that is, not immediately instantiated at startup. Only for singleton beans*/ BooleanIslazyinit (); /*** Set the names of the beans that this bean is depends on being initialized. * The Bean factory would guarantee that these beans get initialized first.
Sets the name of the bean that this bean relies on for initialization
The Bean factory will ensure that these beans are initialized first
*/ voidSetdependson (String ... dependsOn); /*** Return The bean names that this bean is depends on.
Returns the bean name on which this bean is dependent*/string[] Getdependson (); /*** Set Whether this bean was a candidate for getting autowired to some other bean. * <p>note that this flag is designed to only affect type-based autowiring. * It does not affect explicit references by name, which would get resolved even * if the specified bean is not marked a S an Autowire candidate. As a consequence, * autowiring by name would nevertheless inject a bean if the name matches.
Sets whether this bean can automatically connect to other beans
Note that this flag is only used to affect type-based automatic assembly
It does not affect explicit references to names, and can even parse
If the specified bean is not marked as a autowire candidate, as a result
If the name matches, automatic assembly by name will inject a bean
*/ voidSetautowirecandidate (Booleanautowirecandidate); /*** Return Whether this bean was a candidate for getting autowired to some other bean.
Returns whether this bean can be automatically connected to another bean*/ Booleanisautowirecandidate (); /*** Set Whether this bean is a primary autowire candidate. * <p>if This value is {@codetrue} for exactly one bean among multiple * matching candidates, it'll serve as a tie-breaker.
Sets whether this bean is the primary autowire candidate*/ voidSetprimary (Booleanprimary); /*** Return Whether this bean is a primary autowire candidate.
Returns whether this bean is the primary autowire candidate*/ Booleanisprimary (); /*** Specify the factory bean to use and if any. * This is the name of the bean to the specified factory method on. * @see#setFactoryMethodName
Specifies the factory bean to use, which is the name of the bean that invokes the specified factory method*/ voidsetfactorybeanname (String factorybeanname); /*** Return The factory bean name, if any.
Returns the name of the Bean factory, if any*/String getfactorybeanname (); /*** Specify a factory method, if any. This method is invoked with a * constructor arguments, or with no arguments if none is specified. * The method would be invoked on the specified factory beans, if any, * or otherwise as a static method on the local Bea N class. If any, the specified factory method is set, and this method is used to call this method constructor parameter, if not specified,
is not with parameters. The method is invoked on the specified factory bean. If any, or as a local bean class.
Static methods
*/ voidsetfactorymethodname (String factorymethodname); /*** Return A factory method, if any.
Return to factory method if available*/String getfactorymethodname (); /*** Return The constructor argument values for this bean. * <p>the returned instance can be modified during Bean factory post-processing. * @returnThe Constructorargumentvalues object (never {@codenull})
Returns the constructor parameter value for this bean, which can be modified in the Bean factory post-processing to modify the returned instance*/constructorargumentvalues getconstructorargumentvalues (); /*** Return The property values to being applied to a new instance of the bean. * <p>the returned instance can be modified during Bean factory post-processing. * @returnThe Mutablepropertyvalues object (never {@codenull})
Returns the attribute value of the new force to be applied to the bean*/mutablepropertyvalues getpropertyvalues (); //read-only Attributes /*** Return Whether this a <b>singleton</b>, with a single, GKFX instance * returned on all calls. Returns whether it is a singleton mode*/ BooleanIssingleton (); /*** Return whether this a <b>prototype</b> a independent instance * returned for each call. Returns whether it is prototype (prototype mode)*/ BooleanIsprototype (); /*** Return Whether this bean was "abstract", that's, not meant to be instantiated.
Returns whether this bean is an abstract bean, that is, not to instantiate*/ BooleanisAbstract (); /*** Get The role hint for this {@codebeandefinition}. The ROLE hint * provides the frameworks as well as tools with an indication of * the role and importance of a part icular {@codebeandefinition}. Get the role hints for this beandefinition, the role hints provide the framework and the indicated tools*/ intGetrole (); /*** Return A human-readable description of this bean definition.
Returns a readable description of this bean definition*/String getdescription (); /*** Return A description of the resource that this bean definition * came from (for the purpose of showing cont Ext in case of errors).
Returns a description of the resource defined by this bean
From (to display context in the event of an error)
*/String getresourcedescription (); /*** Return The originating beandefinition, or {@codenull} if none. * Allows for retrieving the decorated bean definition, if any. * <p>note that this method returns the immediate originator. Iterate through the * originator chain to find the original beandefinition as defined by the user.
Returns the original beandefinition, or null if not*/beandefinition getoriginatingbeandefinition ();}
Spring source inherits Attributeaccessor's Beandefinition interface