Interface BeanDatabase
- All Known Subinterfaces:
WriteableBeanDatabase
- All Known Implementing Classes:
BeanDatabaseImpl
,WriteableBeanDatabaseImpl
public interface BeanDatabase
A database of beans organized as types, where a type
can have multiple instances of a configuration bean
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Dumps the type and instance names to stderrvoid
dumpDatabase
(PrintStream output) Dumps the type and instance names to the given streamDumps the type and instance names to a String for debuggingGets an unmodifiable set of all the types in the bean databasegetInstance
(String type, String instanceKey) Returns the instance with the given instanceKey from the type with the given nameGets the type with the given name
-
Method Details
-
getAllTypes
Gets an unmodifiable set of all the types in the bean database- Returns:
- A non-null unmodifiable and possibly empty set of all the types in the database
-
getType
Gets the type with the given name- Parameters:
type
- The non-null name- Returns:
- The type corresponding to the given name. May return null
-
getInstance
Returns the instance with the given instanceKey from the type with the given name- Parameters:
type
- The non-null name of the type to get the instance frominstanceKey
- The non-null key of the instance- Returns:
- The bean from the given type with the given name. Will return null if the type does not exist or an instance with that key does not exist
-
dumpDatabase
void dumpDatabase()Dumps the type and instance names to stderr -
dumpDatabase
Dumps the type and instance names to the given stream- Parameters:
output
- - The non-null outut stream to write the database to
-
dumpDatabaseAsString
String dumpDatabaseAsString()Dumps the type and instance names to a String for debugging- Returns:
- A string with all type and instance names
-