1 42 43 package org.jfree.base; 44 45 import org.jfree.JCommon; 46 import org.jfree.base.config.ModifiableConfiguration; 47 import org.jfree.base.log.DefaultLogModule; 48 import org.jfree.util.Configuration; 49 import org.jfree.util.ObjectUtilities; 50 51 57 public class BaseBoot extends AbstractBoot { 58 59 62 private static BaseBoot singleton; 63 64 67 private BootableProjectInfo bootableProjectInfo; 68 69 72 private BaseBoot() { 73 this.bootableProjectInfo = JCommon.INFO; 74 } 75 76 81 public static ModifiableConfiguration getConfiguration() { 82 return (ModifiableConfiguration) getInstance().getGlobalConfig(); 83 } 84 85 97 protected synchronized Configuration loadConfiguration() { 98 return createDefaultHierarchicalConfiguration 99 ("/org/jfree/base/jcommon.properties", 100 "/jcommon.properties", true); 101 } 102 103 108 public static synchronized AbstractBoot getInstance() { 109 if (singleton == null) { 110 singleton = new BaseBoot(); 111 } 112 return singleton; 113 } 114 115 118 protected void performBoot() { 119 ObjectUtilities.setClassLoaderSource 121 (getConfiguration().getConfigProperty("org.jfree.ClassLoader")); 122 123 getPackageManager().addModule(DefaultLogModule.class.getName()); 124 getPackageManager().load("org.jfree.jcommon.modules."); 125 getPackageManager().initializeModules(); 126 } 127 128 133 protected BootableProjectInfo getProjectInfo() { 134 return this.bootableProjectInfo; 135 } 136 } 137 | Popular Tags |