@@ -0,0 +1,1755 @@
+/*%0A * Copyright 2015 Hiroki Uchida%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage dmm4j.conf;%0A%0A/**%0A * ConfigurationFactory implementation for PropertyConfiguration.%0A * Currently getInstance calls concrete constructor each time. No caching at all.%0A *%0A * @author Hiroki Uchida%0A */%0Aclass PropertyConfigurationFactory implements ConfigurationFactory %7B%0A    private static final PropertyConfiguration ROOT_CONFIGURATION;%0A%0A    static %7B%0A        ROOT_CONFIGURATION = new PropertyConfiguration();%0A        // calling ROOT_CONFIGURATION.dumpConfiguration() will cause ExceptionInInitializerError as Logger has not been initialized.%0A        // as a quick and dirty solution, static initializer of twitter4j.Logger will call dumpConfiguration() on behalf.%0A    %7D%0A%0A    @Override%0A    public Configuration getInstance() %7B%0A        return ROOT_CONFIGURATION;%0A    %7D%0A%0A    // It may be preferable to cache the config instance%0A%0A    @Override%0A    public Configuration getInstance(String configTreePath) %7B%0A        PropertyConfiguration conf = new PropertyConfiguration(configTreePath);%0A        conf.dumpConfiguration();%0A        return conf;%0A    %7D%0A%0A    @Override%0A    public void dispose() %7B%0A        // nothing to do for property based configuration%0A    %7D%0A%7D%0A

Add PropertyConfigurationFactory