public abstract class ConfigImpl<T extends Identifiable<T>> implements
ExtendedConfig<T> {
+ private Class<T> type;
private Id<Config> id;
private Map<Id<T>, T> registered;
/**
* Constructs the object.
*/
- public ConfigImpl(Id<Config> aId) {
+ public ConfigImpl(Class<T> aType, Id<Config> aId) {
+ notNull("type", aType);
notNull("id", aId);
+ type = aType;
id = aId;
registered = new HashMap<Id<T>, T>();
}
+ @Override
+ public Class<T> getType() {
+ return type;
+ }
+
/**
* Copies the config object.
*