Package org.jboss.weld.resources.spi

Examples of org.jboss.weld.resources.spi.ResourceLoadingException


    @Override
    public Class<?> classForName(String name) {
        try {
            return classLoader().loadClass(name);
        } catch (ClassNotFoundException e) {
            throw new ResourceLoadingException(ERROR_LOADING_CLASS + name, e);
        } catch (LinkageError e) {
            throw new ResourceLoadingException(ERROR_LOADING_CLASS + name, e);
        } catch (TypeNotPresentException e) {
            throw new ResourceLoadingException(ERROR_LOADING_CLASS + name, e);
        }
    }
View Full Code Here


    @Override
    public Collection<URL> getResources(String name) {
        try {
            return new EnumerationList<>(classLoader().getResources(name));
        } catch (IOException e) {
            throw new ResourceLoadingException("Error loading resource " + name, e);
        }
    }
View Full Code Here

        try {
            return backedAnnotatedTypes.getCastValue(new TypeHolder<T>(rawType, baseType, bdaId));
        } catch (RuntimeException e) {
            if (e instanceof TypeNotPresentException || e instanceof ResourceLoadingException) {
                BootstrapLogger.LOG.exceptionWhileLoadingClass(rawType.getName(), e);
                throw new ResourceLoadingException("Exception while loading class " + rawType.getName(), e);
            }
            throw e;
        } catch (Error e) {
            if(e instanceof NoClassDefFoundError || e instanceof LinkageError) {
                throw new ResourceLoadingException("Error while loading class " + rawType.getName(), e);
            }
            BootstrapLogger.LOG.errorWhileLoadingClass(rawType.getName(), e);
            throw e;
        }
    }
View Full Code Here

         classes.put(name, clazz);
         return clazz;
      }
      catch (NoClassDefFoundError e)
      {
         throw new ResourceLoadingException(e);
      }
      catch (ClassNotFoundException e)
      {
         throw new ResourceLoadingException(e);
      }
      catch (LinkageError e)
      {
         throw new ResourceLoadingException(e);
      }
   }
View Full Code Here

      {
         return classLoader.getResource(name);
      }
      catch (Exception e)
      {
         throw new ResourceLoadingException(e);
      }
   }
View Full Code Here

         }
         return resources;
      }
      catch (Exception e)
      {
         throw new ResourceLoadingException(e);
      }

   }
View Full Code Here

                c = c.getSuperclass();
            }
            classes.put(name, clazz);
            return clazz;
        } catch (NoClassDefFoundError e) {
            throw new ResourceLoadingException(e);
        } catch (ClassNotFoundException e) {
            throw new ResourceLoadingException(e);
        } catch (LinkageError e) {
            throw new ResourceLoadingException(e);
        }
    }
View Full Code Here

    @Override
    public URL getResource(String name) {
        try {
            return module.getClassLoader().getResource(name);
        } catch (Exception e) {
            throw new ResourceLoadingException(e);
        }
    }
View Full Code Here

            while (urls.hasMoreElements()) {
                resources.add(urls.nextElement());
            }
            return resources;
        } catch (Exception e) {
            throw new ResourceLoadingException(e);
        }

    }
View Full Code Here

            {
               return Collections.list(classLoader.getResources(name));
            }
            catch (Exception e)
            {
               throw new ResourceLoadingException(e);
            }
         }
        
         public URL getResource(String name)
         {
            return classLoader.getResource(name);
         }
        
         public Class<?> classForName(String name)
         {
            try
            {
               return classLoader.loadClass(name);
            }
            catch (Exception e)
            {
               throw new ResourceLoadingException(e);
            }
         }
      });
   }
View Full Code Here

TOP

Related Classes of org.jboss.weld.resources.spi.ResourceLoadingException

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.