public interface MutableBeanStore extends BeanStore
Definition of an interface for a BeanStore
that can be
manipulated.
This interface inherits from the basic BeanStore
interface and
adds a set of methods to it that allow for changes of the store, i.e. adding/
removing bean providers or cleaning the whole store.
Modifier and Type | Method and Description |
---|---|
String |
addAnonymousBeanProvider(int index,
BeanProvider provider)
Adds an anonymous
BeanProvider to this
BeanStore . |
void |
addBeanProvider(String name,
BeanProvider provider)
Adds the specified
BeanProvider to this bean store under
the given name. |
void |
clear()
Removes all
BeanProvider s from this bean store. |
BeanProvider |
removeBeanProvider(String name)
Removes the
BeanProvider with the specified name from this
bean store. |
void |
setName(String n)
Sets the name of this bean store.
|
void |
setParent(BeanStore p)
Sets the parent for this bean store.
|
getBeanProvider, getConversionHelper, getName, getParent, providerNames
void addBeanProvider(String name, BeanProvider provider)
BeanProvider
to this bean store under
the given name.name
- the name of the bean provider (must not be null)provider
- the BeanProvider
to be registeredIllegalArgumentException
- if the name or the provider is nullString addAnonymousBeanProvider(int index, BeanProvider provider)
BeanProvider
to this
BeanStore
. It is possible to define beans in the context
of a dependency tag (e.g. a <param>
tag); then this
bean is only visible in this narrow context and cannot be accessed from
elsewhere. This makes sense for beans that are used only once and are not
shared between different components; then defining the bean directly at
the point where it is used is more readable. Such beans do not have a
real name, but an internal name is generated by this method, which is
treated specially. For instance, internal names won't be returned by the
providerNames()
methods. The passed in index parameter is
used for generating a unique name for the provider. It is in the
responsibility of the caller to pass in unique numbers.index
- the index of the BeanProvider
provider
- the BeanProvider
to be registered (must
not be null)BeanProvider
IllegalArgumentException
- if the BeanProvider
is
nullBeanProvider removeBeanProvider(String name)
BeanProvider
with the specified name from this
bean store. If this provider cannot be found, this operation has no
effect.name
- the name of the provider to removevoid clear()
BeanProvider
s from this bean store.void setName(String n)
n
- the new namevoid setParent(BeanStore p)
p
- the parentCopyright © 2016 The JGUIraffe Team. All rights reserved.