Package org.jboss.classloading.spi.visitor

Examples of org.jboss.classloading.spi.visitor.ClassVisitor


      factory.setRoots(Arrays.asList(System.getProperty("test.dir") + "/support/"));
      KernelDeployment deployment = install(factory);
      try
      {
         final Map<String, byte[]> bytes = new HashMap<String,byte[]>();
         ResourceVisitor visitor = new ClassVisitor()
         {
            public void visit(ResourceContext resource)
            {
               try
               {
View Full Code Here


      factory.setRoots(Arrays.asList(System.getProperty("test.dir") + "/support/"));
      KernelDeployment deployment = install(factory);
      try
      {
         final Set<String> classes = new HashSet<String>();
         ResourceVisitor visitor = new ClassVisitor()
         {
            public void visit(ResourceContext resource)
            {
               classes.add(resource.getResourceName());
            }
         };
         ResourceFilter recurseFilter = new ResourceFilter()
         {
            public boolean accepts(ResourceContext resource)
            {
               return "a".equals(resource.getResourceName());
            }
         };

         Module module = assertModule("test:0.0.0");
         module.visit(visitor, visitor.getFilter(), recurseFilter);

         assertEquals(1, classes.size());
         assertEquals(aliases.get(classes.iterator().next()), A.class);
      }
      finally
View Full Code Here

      );
      KernelDeployment deployment = install(factory);
      try
      {
         final Set<String> classes = new HashSet<String>();
         ResourceVisitor visitor = new ClassVisitor()
         {
            public void visit(ResourceContext resource)
            {
               classes.add(resource.getResourceName());
            }
         };

         URL aURL = new URL("vfs" + System.getProperty("test.dir") + "/support/a/");
         Module module = assertModule("test:0.0.0");
         module.visit(visitor, visitor.getFilter(), null, aURL);

         assertEquals(1, classes.size());
         assertEquals(classes.iterator().next(), A.class.getSimpleName() + ".class");
      }
      finally
View Full Code Here

      );
      KernelDeployment deployment = install(factory);
      try
      {
         final Set<String> classes = new TreeSet<String>();
         ResourceVisitor visitor = new ClassVisitor()
         {
            public void visit(ResourceContext resource)
            {
               classes.add(resource.getResourceName());
            }
         };

         URL aURL = new URL("vfs" + System.getProperty("test.dir") + "/support/a/");
         URL bURL = new URL("vfs" + System.getProperty("test.dir") + "/support/b/");
         Module module = assertModule("test:0.0.0");
         module.visit(visitor, visitor.getFilter(), null, aURL, bURL);

         assertEquals(2, classes.size());
         Iterator<String> iterator = classes.iterator();
         assertEquals(iterator.next(), A.class.getSimpleName() + ".class");
         assertEquals(iterator.next(), B.class.getSimpleName() + ".class");
View Full Code Here

      factory.setRoots(Arrays.asList(System.getProperty("test.dir") + "/support/"));
      KernelDeployment deployment = install(factory);
      try
      {
         final List<String> classes = new ArrayList<String>();
         ResourceVisitor visitor = new ClassVisitor()
         {
            public void visit(ResourceContext resource)
            {
               classes.add(resource.getResourceName());
            }
View Full Code Here

      factory.setRoots(Arrays.asList(System.getProperty("test.dir") + "/support/"));
      KernelDeployment deployment = install(factory);
      try
      {
         final List<String> classes = new ArrayList<String>();
         ResourceVisitor visitor = new ClassVisitor()
         {
            public void visit(ResourceContext resource)
            {
               classes.add(resource.getResourceName());
            }
View Full Code Here

   protected void visitModule()
   {
      Module module = assertModule("test:0.0.0");
      final Set<String> set = new HashSet<String>();
      ResourceVisitor visitor = new ClassVisitor()
      {
         public void visit(ResourceContext resource)
         {
            set.add(resource.getResourceName());
         }
View Full Code Here

TOP

Related Classes of org.jboss.classloading.spi.visitor.ClassVisitor

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.