コード例 #1
0
 /** Returns the ExtensionPoint to use for the Locator values. */
 private ExtensionPoint getExtensionPoint() {
   ExtensionPointManager manager = DefaultExtensionPointManager.getManager();
   String moduleName = getLocatorName();
   // synchronize the retrieval of the ExtensionPoint
   synchronized (lock) {
     ExtensionPoint extensionPoint = manager.get(moduleName);
     if (extensionPoint == null) {
       extensionPoint = manager.add(moduleName);
     }
     return extensionPoint;
   }
 }
コード例 #2
0
  /**
   * Constructor
   *
   * @param filterStack
   */
  public RasterFilterListManager(RasterFilterList filterStack) {
    this.rasterFilterList = filterStack;

    // Cargamos el manager con los gestores de drivers registrados
    ExtensionPointManager extensionPoints = ToolsLocator.getExtensionPointManager();
    ExtensionPoint point = extensionPoints.get("RasterFilter");
    Iterator iterator = point.iterator();
    while (iterator.hasNext()) {
      ExtensionPoint.Extension entry = (ExtensionPoint.Extension) iterator.next();
      if (entry != null) {
        Class RasterClass = entry.getExtension();
        Object obj = RasterFilterListManager.loadClass(RasterClass, this);
        if (obj != null) managers.add(obj);
      }
    }
  }