public interface BeanDirectory
| Modifier and Type | Method and Description |
|---|---|
<T> java.lang.Iterable<T> |
getAllByType(java.lang.Class<T> type)
Get all objects in the directory of the required type.
|
default java.util.Collection<java.lang.String> |
getAllIds()
Provide all the Ids in the directory.
|
java.lang.String |
getIdFor(java.lang.Object bean)
Find the id for the given component.
|
java.lang.Object |
lookup(java.lang.String path)
Get the value which is either a bean or the property of a
bean.
|
<T> T |
lookup(java.lang.String path,
java.lang.Class<T> required)
Get a value, as above, but also convert it into to given
type.
|
java.lang.Object lookup(java.lang.String path)
throws ArooaPropertyException
The path can be either:
path - The path.ArooaPropertyException - If property access fails.<T> T lookup(java.lang.String path,
java.lang.Class<T> required)
throws ArooaPropertyException,
ArooaConversionException
Conversion in the directory is required when the client code has no access to the converters required, for instance in a nested Oddjob.
T - The required type.path - The full pathrequired - The required type.ArooaConversionException - If an object can be found but
it can't be converted into the required type.ArooaPropertyException - If property access fails.java.lang.String getIdFor(java.lang.Object bean)
bean - The component.default java.util.Collection<java.lang.String> getAllIds()
UnsupportedOperationException for a bit.<T> java.lang.Iterable<T> getAllByType(java.lang.Class<T> type)
Why an Iterable not a Collection or Set? It was thought that this would force read only use. Maybe it should be an array...
T - The required type.type - The type.