public List<ModuleDefinition> findAll(String name) { List<ModuleDefinition> result = new ArrayList<ModuleDefinition>(); for (ModuleDefinition md : findAll()) { if (name.equals(md.getName())) result.add(md); } return result; }
public void initialize() throws IOException { assert moduleDefs==null; // TODO: is it allowed to call the initialize method multiple times? moduleDefs = new HashMap<ModuleId, ModuleDefinition>(); libraries = new ArrayList<URI>(); loadModuleDefs(moduleDefs, libraries); }
@Override public synchronized boolean addListener(RepositoryChangeListener listener) { final boolean returnValue = super.addListener(listener); if (returnValue && timer==null) { initializeSubDirectories(); timer = new Timer("hk2-repo-listener-"+ this.getName(), isTimerThreadDaemon); timer.schedule(new TimerTask() { long lastModified = repository.lastModified(); public void run() { synchronized(this) { if (lastModified<repository.lastModified()) { lastModified = repository.lastModified(); // something has changed, look into this... directoryChanged(); } } } }, intervalInMs, intervalInMs); timer.purge(); } return returnValue; }
String bundleName = attr.getValue(ManifestConstants.BUNDLE_NAME); if (bundleName!=null) { return newModuleDefinition(jar, attr);
List<URI> originalLibraries = super.getJarLocations(); for (URI location : libraries) { if (!originalLibraries.contains(location)) {
@Override public synchronized boolean addListener(RepositoryChangeListener listener) { final boolean returnValue = super.addListener(listener); if (returnValue && timer==null) { initializeSubDirectories(); timer = new Timer("hk2-repo-listener-"+ this.getName(), isTimerThreadDaemon); timer.schedule(new TimerTask() { long lastModified = repository.lastModified(); public void run() { synchronized(this) { if (lastModified<repository.lastModified()) { lastModified = repository.lastModified(); // something has changed, look into this... directoryChanged(); } } } }, intervalInMs, intervalInMs); timer.purge(); } return returnValue; }
String bundleName = attr.getValue(ManifestConstants.BUNDLE_NAME); if (bundleName!=null) { return newModuleDefinition(jar, attr);
List<URI> originalLibraries = super.getJarLocations(); for (URI location : libraries) { if (!originalLibraries.contains(location)) {
public List<ModuleDefinition> findAll(String name) { List<ModuleDefinition> result = new ArrayList<ModuleDefinition>(); for (ModuleDefinition md : findAll()) { if (name.equals(md.getName())) result.add(md); } return result; }
public void initialize() throws IOException { assert moduleDefs==null; // TODO: is it allowed to call the initialize method multiple times? moduleDefs = new HashMap<ModuleId, ModuleDefinition>(); libraries = new ArrayList<URI>(); loadModuleDefs(moduleDefs, libraries); }
public String toString() { StringBuffer s= new StringBuffer(); for (ModuleDefinition moduleDef : findAll()) { s.append(moduleDef.getName()).append(":"); } return s.toString(); }
public String toString() { StringBuffer s= new StringBuffer(); for (ModuleDefinition moduleDef : findAll()) { s.append(moduleDef.getName()).append(":"); } return s.toString(); }