Example #1
0
 /*  19:    */
 /*  20:    */ static
 /*  21:    */ {
   /*  22:    */ try
   /*  23:    */ {
     /*  24: 33 */ String defaultSingletonClass = "org.dom4j.util.SimpleSingleton";
     /*  25: 34 */ Class clazz = null;
     /*  26:    */ try
     /*  27:    */ {
       /*  28: 36 */ String singletonClass = defaultSingletonClass;
       /*  29: 37 */ singletonClass =
           System.getProperty("org.dom4j.QName.singleton.strategy", singletonClass);
       /*  30:    */
       /*  31: 39 */ clazz = Class.forName(singletonClass);
       /*  32:    */ }
     /*  33:    */ catch (Exception exc1)
     /*  34:    */ {
       /*  35:    */ try
       /*  36:    */ {
         /*  37: 42 */ String singletonClass = defaultSingletonClass;
         /*  38: 43 */ clazz = Class.forName(singletonClass);
         /*  39:    */ }
       /*  40:    */ catch (Exception exc2) {
       }
       /*  41:    */ }
     /*  42: 47 */ singleton = (SingletonStrategy) clazz.newInstance();
     /*  43: 48 */ singleton.setSingletonClassName(QNameCache.class.getName());
     /*  44:    */ }
   /*  45:    */ catch (Exception exc3) {
   }
   /*  46:    */ }
 static {
   try {
     String defaultSingletonClass = "org.dom4j.util.SimpleSingleton";
     Class clazz = null;
     try {
       String singletonClass = defaultSingletonClass;
       singletonClass =
           System.getProperty(
               "org.dom4j.dom.DOMDocumentFactory.singleton.strategy", singletonClass);
       clazz = Class.forName(singletonClass);
     } catch (Exception exc1) {
       try {
         String singletonClass = defaultSingletonClass;
         clazz = Class.forName(singletonClass);
       } catch (Exception exc2) {
       }
     }
     singleton = (SingletonStrategy) clazz.newInstance();
     singleton.setSingletonClassName(DOMDocumentFactory.class.getName());
   } catch (Exception exc3) {
   }
 }
 /**
  * Access to the singleton instance of this factory.
  *
  * @return the default singleon instance
  */
 public static DocumentFactory getInstance() {
   DOMDocumentFactory fact = (DOMDocumentFactory) singleton.instance();
   return fact;
 }
Example #4
0
 /* 204:    */
 /* 205:    */ private static QNameCache getCache() /* 206:    */ {
   /* 207:253 */ QNameCache cache = (QNameCache) singleton.instance();
   /* 208:254 */ return cache;
   /* 209:    */ }