Esempio n. 1
0
  protected void buildAll() {
    _libraries = new ArrayList();
    Set builtLibraries = new HashSet();
    for (int i = 0; i < _scanners.size(); i++) {
      SourceScanner scanner = (SourceScanner) _scanners.get(i);
      for (Iterator it = scanner.scan(); it.hasNext(); ) {
        SourceDescriptor source = (SourceDescriptor) it.next();
        boolean built = false;
        for (int k = 0; k < _builders.size(); k++) {
          DefinitionBuilder builder = (DefinitionBuilder) _builders.get(k);
          LibraryDefinition library = builder.build(source);
          if (library != null) {
            if (builtLibraries.contains(library.getNamespaceURI()) == false) {
              _libraries.add(library);
              builtLibraries.add(library.getNamespaceURI());
              if (LOG.isInfoEnabled()) {
                LOG.info(
                    StringUtil.getMessage(
                        LibraryManagerImpl.class,
                        4,
                        source.getSystemID(),
                        String.valueOf(library.getNamespaceURI())));
              }
            }
            built = true;
            break;
          }
        }

        if (built == false) {
          assignTaglibLocation(source);
        }
      }
    }
  }
Esempio n. 2
0
 public void addSourceScanner(SourceScanner scanner) {
   if (scanner == null) {
     throw new IllegalArgumentException();
   }
   synchronized (_scanners) {
     if (_scanners.contains(scanner)) {
       warnAlreadyRegistered(scanner, scanner.getClass().getName(), 1);
     } else {
       _scanners.add(scanner);
     }
   }
 }