Beispiel #1
0
 static {
   // load the types from the configuration
   Config config = new Config("/rsrc/config/editor/type");
   for (Iterator<String> it = config.keys(); it.hasNext(); ) {
     String key = it.next();
     ArrayList<Class<?>> classes = new ArrayList<Class<?>>();
     for (String cname : config.getValue(key, ArrayUtil.EMPTY_STRING)) {
       try {
         addSubtypes(Class.forName(cname), classes);
       } catch (ClassNotFoundException e) {
         log.warning("Missing type config class.", "class", cname, e);
       }
     }
     _configTypes.put(key, classes.toArray(new Class<?>[classes.size()]));
   }
 }