Examples of ClasspathEntry


Examples of org.jboss.deployers.spi.structure.ClassPathEntry

  
   protected abstract ClassPathEntry createPathAndSuffixes(String path, String suffixes);

   public void testConstructorPathAndSuffixes()
   {
      ClassPathEntry entry = createPathAndSuffixes("path", "suffixes");
      assertEquals("path", entry.getPath());
      assertEquals("suffixes", entry.getSuffixes());

      entry = createPathAndSuffixes("path", null);
      assertEquals("path", entry.getPath());
      assertNull(entry.getSuffixes());
   }
View Full Code Here

Examples of org.jboss.deployers.spi.structure.ClassPathEntry

      ContextInfo context = createPathAndClassPath("", null);
      assertDefaultPath(context);
      assertDefaultMetaDataPath(context);
      assertNull(context.getClassPath());

      ClassPathEntry entry1 = createClassPathEntry("path1");
      context.addClassPathEntry(entry1);
      assertDefaultPath(context);
      assertDefaultMetaDataPath(context);
      assertClassPath(context, entry1);

      ClassPathEntry entry2 = createClassPathEntry("path2");
      context.addClassPathEntry(entry2);
      assertDefaultPath(context);
      assertDefaultMetaDataPath(context);
      assertClassPath(context, entry1, entry2);
   }
View Full Code Here

Examples of org.jboss.deployers.spi.structure.ClassPathEntry

      }
   }
  
   public void testEqualsAndHashCode()
   {
      ClassPathEntry one = createDefault();
      ClassPathEntry two = createDefault();
      assertEquals(one, two);
      assertEquals(two, one);
      assertEquals(one.hashCode(), two.hashCode());
     
      two = createPathAndSuffixes("", null);
      assertEquals(one, two);
      assertEquals(two, one);
      assertEquals(one.hashCode(), two.hashCode());
     
      one = createPathAndSuffixes("path", "suffixes");
      two = createPathAndSuffixes("path", "suffixes");
      assertEquals(one, two);
      assertEquals(two, one);
      assertEquals(one.hashCode(), two.hashCode());
     
      one = createPathAndSuffixes("path", "suffixes");
      two = createPathAndSuffixes("not-path", "suffixes");
      assertNotSame(one, two);
      assertNotSame(two, one);
      assertNotSame(one.hashCode(), two.hashCode());
     
      one = createPathAndSuffixes("path", "suffixes");
      two = createPathAndSuffixes("Path", "not-suffixes");
      assertNotSame(one, two);
      assertNotSame(two, one);
      assertNotSame(one.hashCode(), two.hashCode());
     
      one = createPathAndSuffixes("path", "suffixes");
      two = createPathAndSuffixes("Path", null);
      assertNotSame(one, two);
      assertNotSame(two, one);
      assertNotSame(one.hashCode(), two.hashCode());
   }
View Full Code Here

Examples of org.jboss.deployers.spi.structure.ClassPathEntry

      assertNotSame(one.hashCode(), two.hashCode());
   }
  
   public void testSerialization() throws Exception
   {
      ClassPathEntry entry = createDefault();
      assertEquals("", entry.getPath());
      assertNull(entry.getSuffixes());

      entry = serializeDeserialize(entry, ClassPathEntry.class);
      assertEquals("", entry.getPath());
      assertNull(entry.getSuffixes());

      entry = createPathAndSuffixes("path", "suffixes");
      assertEquals("path", entry.getPath());
      assertEquals("suffixes", entry.getSuffixes());

      entry = serializeDeserialize(entry, ClassPathEntry.class);
      assertEquals("path", entry.getPath());
      assertEquals("suffixes", entry.getSuffixes());
   }
View Full Code Here

Examples of org.jboss.deployers.spi.structure.ClassPathEntry

         int cpeSize = classPathEntries.size();
         int cpSize = classPath != null ? classPath.size() : 0;
         assertTrue(cpeSize >= cpSize);
         for(int i = 0; i < cpeSize; i++)
         {
            ClassPathEntry entry = classPathEntries.get(i);
            VirtualFile file = (i < cpSize) ? classPath.get(i) : null;
            String path = entry.getPath();
            if ("".equals(path))
               assertTrue(file == null || "".equals(file.getPathName()));
            else
            {
               assertNotNull(file);
View Full Code Here

Examples of org.jboss.deployers.spi.structure.ClassPathEntry

      // Translate from VirtualFile to relative paths
      for (VirtualFile vf : paths)
      {
         String entryPath = getRelativePath(root, vf);
         ClassPathEntry cpe = StructureMetaDataFactory.createClassPathEntry(entryPath);
         context.addClassPathEntry(cpe);
         if (trace)
            log.trace("Added classpath entry " + entryPath + " for " + vf.getName() + " from " + root);
      }
   }
View Full Code Here

Examples of org.jboss.deployers.spi.structure.ClassPathEntry

      Object child = null;
      if( localName.equals("path") )
      {
         String name = attrs.getValue("name");
         String suffixes = attrs.getValue("suffixes");
         ClassPathEntry path = new ClassPathEntryImpl(name, suffixes);
         parent.add(path);
      }
      return child;
   }
View Full Code Here

Examples of org.jboss.deployers.spi.structure.ClassPathEntry

      // Translate from VirtualFile to relative paths
      for (VirtualFile vf : paths)
      {
         String entryPath = getRelativePath(root, vf);
         ClassPathEntry cpe = StructureMetaDataFactory.createClassPathEntry(entryPath);
         context.addClassPathEntry(cpe);
         if (trace)
            log.trace("Added classpath entry " + entryPath + " for " + vf.getName() + " from " + root);
      }
   }
View Full Code Here

Examples of org.jboss.test.virtual.support.ClassPathIterator.ClassPathEntry

      VirtualFile classes = war.findChild("WEB-INF/classes");
      assertTrue("WEB-INF/classes != null", classes != null);
      HashSet<String> names = new HashSet<String>();
      ClassPathIterator iter = new ClassPathIterator(classes.toURL());
      ClassPathEntry entry = null;
      while( (entry = iter.getNextEntry()) != null )
      {
         names.add(entry.name);
      }
      log.debug(names);
View Full Code Here

Examples of org.jboss.test.virtual.support.ClassPathIterator.ClassPathEntry

      VirtualFile classes = war.findChild("WEB-INF/classes");
      assertTrue("WEB-INF/classes != null", classes != null);
      HashSet<String> names = new HashSet<String>();
      ClassPathIterator iter = new ClassPathIterator(classes.toURL());
      ClassPathEntry entry = null;
      while( (entry = iter.getNextEntry()) != null )
      {
         names.add(entry.name);
      }
      log.debug(names);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.