public class Define extends AnchorBean<Define>
NamedBean
s can be specified.
These definitions are indexed by string identifiers.
Constructor and Description |
---|
Define() |
Modifier and Type | Method and Description |
---|---|
void |
add(NamedBean<?> bean)
Adds a named-bean to our definitions, using the {#link GroupingRoot} annotation to determine
a group where definitions are stored.
|
void |
addAll(Define source)
Adds all the named-beans from source to the current map.
|
<T extends AnchorBean<?>> |
addAll(List<NamedBean<T>> list)
Adds all the named-beans from source to the current map.
|
Define |
duplicateBean()
Creates a new bean that deep-copies every property value.
|
<T extends AnchorBean<?>> |
listFor(Class<?> groupingRoot)
Retrieves the list of elements associated with a grouping-root.
|
checkMisconfigured, describeBean, describeChildren, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public void add(NamedBean<?> bean) throws DefineAddException
Any added-bean must of a type that contains the GroupingRoot
annotation in its
class hierarchy.
bean
- a named-bean to add.DefineAddException
- if a {#link GroupingRoot} cannot be found in the class-hierarchy.public void addAll(Define source)
This is a shallow copy.
source
- where to copy from.public <T extends AnchorBean<?>> void addAll(List<NamedBean<T>> list) throws DefineAddException
This is a shallow copy.
T
- type of bean to add.list
- where to copy from.DefineAddException
- if a {#link GroupingRoot} cannot be found in the class-hierarchy.public <T extends AnchorBean<?>> List<NamedBean<T>> listFor(Class<?> groupingRoot)
T
- type of elements in the list to retrieve. This should correspond to groupingRoot
or a subclass.groupingRoot
- a class corresponding to a grouping-root (family-type) that may exist in
Define
.public Define duplicateBean()
AnchorBean
Any state that is not a BeanField
is ignored.
duplicateBean
in class AnchorBean<Define>
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.