Implementations must return the primary BeanDefinition that results
from the parse if they will ever be used in a nested fashion (for example as
an inner tag in a <property/> tag). Implementations may return
null if they will not be used in a nested fashion.
Subclasses can override this method to control whether or not the supplied
bean is actually even registered, or to
register even more beans.
The default implementation registers the supplied bean
with the supplied registry only if the isNested
parameter is false, because one typically does not want inner beans
to be registered as top level beans.
definition - the bean definition to be registered
registry - the registry that the bean is to be registered with
Should an ID be generated instead of read from the passed in Element?
Disabled by default; subclasses can override this to enable ID generation.
Note that this flag is about always generating an ID; the parser
won't even check for an "id" attribute in this case.
whether the parser should always generate an id
protected boolean shouldGenerateIdAsFallback()
Should an ID be generated instead if the passed in Element does not
specify an "id" attribute explicitly?
Disabled by default; subclasses can override this to enable ID generation
as fallback: The parser will first check for an "id" attribute in this case,
only falling back to a generated ID if no value was specified.
whether the parser should generate an id if no id was specified
protected boolean shouldParseNameAsAliases()
Determine whether the element's "name" attribute should get parsed as
bean definition aliases, i.e. alternative bean definition names.
The default implementation returns true.
whether the parser should evaluate the "name" attribute as aliases
protected boolean shouldFireEvents()
Determine whether this parser is supposed to fire a
event after parsing the bean definition.
This implementation returns true by default; that is,
an event will be fired when a bean definition has been completely parsed.
Override this to return false in order to suppress the event.
true in order to fire a component registration event
after parsing the bean definition; false to suppress the event