io.milton.context.FactoryCatalog Maven / Gradle / Ivy
The newest version!
/*
*
* Copyright 2014 McEvoy Software Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.milton.context;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class FactoryCatalog {
private static final Logger log = LoggerFactory.getLogger(FactoryCatalog.class);
public final Map factoriesByClass = new HashMap<>();
public final Map factoriesById = new HashMap<>();
public final List factories = new ArrayList<>();
public final Map keys = new HashMap<>();
public File configFile;
public void setKeys(Map mapOfKeys) {
for (Map.Entry entry : mapOfKeys.entrySet()) {
addKey(entry.getKey(), entry.getValue());
}
}
public Map getKeys() {
return keys;
}
public List getFactories() {
return factories;
}
public void setFactories(List list) {
for (Factory f : list) {
addFactory(f);
}
}
public void setSingletons(List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy