Package net.sf.robocode.repository.items

Examples of net.sf.robocode.repository.items.IRepositoryItem


  }

  private void createItem(List<IRepositoryItem> repositoryItems, URL root, JarEntry entry) {
    try {
      String pUrl = root.toString() + entry.getName();
      IRepositoryItem repositoryItem = ItemHandler.registerItem(new URL(pUrl), JarRoot.this, repository);

      if (repositoryItem != null) {
        if (repositoryItem instanceof RobotItem) {
          RobotItem robotItem = (RobotItem) repositoryItem;
View Full Code Here


    Collection<String> friendlyUrls = repositoryItem.getFriendlyURLs();
    if (friendlyUrls != null) {
      // Add or update the item so it can be found using later using any friendly URL
      for (String friendly : friendlyUrls) {
        if (friendly != null) {
          IRepositoryItem existingItem = repositoryItems.get(friendly);
          // Add the item if it does not exist already, or update it if the version is newer
          // than the existing item.
          if (existingItem == null || repositoryItem.compareTo(existingItem) > 0) {
            repositoryItems.put(friendly, repositoryItem);
          }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public IRepositoryItem getItem(String friendlyUrl) {
    IRepositoryItem repositoryItem = repositoryItems.get(friendlyUrl);
    if (repositoryItem == null) {
      repositoryItem = removedItems.get(friendlyUrl);
    }
    return repositoryItem;
  }
View Full Code Here

    visitDirectory(rootPath, items, itemsLastModification);

    // Run thru all found repository items and update these according to their 'last modified' date
    for (int i = 0; i < items.size(); i++) {
      IRepositoryItem repositoryItem = items.get(i);
      repositoryItem.update(itemsLastModification.get(i), force);
    }
  }
View Full Code Here

    path.listFiles(
        new FileFilter() {
      public boolean accept(File pathname) {
        if (pathname.isFile()) {
          try {
            IRepositoryItem repositoryItem = ItemHandler.registerItem(pathname.toURI().toURL(),
                ClasspathRoot.this, repository);
            if (repositoryItem != null) {
              items.add(repositoryItem);
              itemsLastModification.add(pathname.lastModified());
            }
View Full Code Here

TOP

Related Classes of net.sf.robocode.repository.items.IRepositoryItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.