Пример #1
0
 /**
  * Reads all the the properties that match the specified suffix and load them into the class map
  * without actually loading the classes. Use the {@link PluginReader#loadClass(String, String,
  * String, Class)} method to load a specific class into memory.
  *
  * @param suffix
  * @param map
  */
 public static void registerLazyPlugin(String suffix, Map<String, String> map) {
   List<String[]> filters = PluginReader.readProperties(suffix);
   for (String[] filter : filters) {
     if (filter.length >= 2) {
       map.put(filter[0], filter[1]);
     }
   }
 }
Пример #2
0
 /**
  * Reads all the the properties that match the specified suffix and load them into the map.
  *
  * @param suffix
  * @param map
  * @param parentClass
  */
 public static void registerPlugin(String suffix, Map<String, Class> map, Class parentClass) {
   List<String[]> filters = PluginReader.readProperties(suffix);
   for (String[] filter : filters) {
     if (filter.length >= 2) {
       Class clazz = loadClass(suffix, filter[0], filter[1], parentClass);
       map.put(filter[0], clazz);
     }
   }
 }
Пример #3
0
 static {
   PluginReader.registerPlugin("-stream-builder.classmap", cmap, StreamBuilder.class);
 }