Examples of loadResource()


Examples of net.sf.jiga.xtended.kernel.JXAenvUtils.loadResource()

    @return true if the registry file's been successfully found and installed*/
    public static boolean _installJMFRegistry(File cpDir) {
        JXAenvUtils env = new JXAenvUtils(ExtensionsClassLoader.getInstance().getClassLoader());
        env.addEnvFile("jmfRegistry", env.getEnvClassLoader().getResource("jmf.properties"));
        env.setJXAenvPath(cpDir.getPath());
        env.loadResource();
        return env.isResourceLoaded();
    }

    /** allows a Swing context to be run with a returned value.
    it checks if the {@linkplain SwingUtilities#invokeAndWait(Runnable)} can be run (if not,
View Full Code Here

Examples of org.dozer.util.DozerClassLoader.loadResource()

    }

    log.info("Trying to find Dozer configuration file: {}", propFileName);
    // Load prop file. Prop file is optional, so if it's not found just use defaults
    DozerClassLoader classLoader = BeanContainer.getInstance().getClassLoader();
    URL url = classLoader.loadResource(propFileName);
    if (url == null) {
      log.warn("Dozer configuration file not found: {}.  Using defaults for all Dozer global properties.", propFileName);
      return;
    } else {
      log.info("Using URL [{}] for Dozer global property configuration", url);
View Full Code Here

Examples of org.dozer.util.DozerClassLoader.loadResource()

    if (systemId != null && systemId.indexOf(DozerConstants.XSD_NAME) > systemId.lastIndexOf("/")) {
      String fileName = systemId.substring(systemId.indexOf(DozerConstants.XSD_NAME));
      log.debug("Trying to locate [{}] in classpath", fileName);
      try {
        DozerClassLoader classLoader = BeanContainer.getInstance().getClassLoader();
        URL url = classLoader.loadResource(fileName);
        InputStream stream = url.openStream();
        InputSource source = new InputSource(stream);
        source.setPublicId(publicId);
        source.setSystemId(systemId);
        log.debug("Found beanmapping XML Schema [{}] in classpath", systemId);
View Full Code Here

Examples of org.dozer.util.DozerClassLoader.loadResource()

    documentBuilder = parserFactory.createParser();
  }

  public MappingFileData read(String fileName) {
    DozerClassLoader classLoader = BeanContainer.getInstance().getClassLoader();
    URL url = classLoader.loadResource(fileName);
    return read(url);
  }

  public MappingFileData read(URL url) {
    MappingFileData result = null;
View Full Code Here

Examples of org.dozer.util.DozerClassLoader.loadResource()

    streamReader = new MappingStreamReader(parserFactory);
  }

  public MappingFileData read(String fileName) {
    DozerClassLoader classLoader = BeanContainer.getInstance().getClassLoader();
    URL url = classLoader.loadResource(fileName);
    return read(url);
  }

  public MappingFileData read(URL url) {
    MappingFileData result = null;
View Full Code Here

Examples of org.dozer.util.DozerClassLoader.loadResource()

    if (systemId != null && systemId.indexOf(DozerConstants.XSD_NAME) > systemId.lastIndexOf("/")) {
      String fileName = systemId.substring(systemId.indexOf(DozerConstants.XSD_NAME));
      log.debug("Trying to locate [{}] in classpath", fileName);
      try {
        DozerClassLoader classLoader = BeanContainer.getInstance().getClassLoader();
        URL url = classLoader.loadResource(fileName);
        InputStream stream = url.openStream();
        InputSource source = new InputSource(stream);
        source.setPublicId(publicId);
        source.setSystemId(systemId);
        log.debug("Found beanmapping XML Schema [{}] in classpath", systemId);
View Full Code Here

Examples of org.dozer.util.DozerClassLoader.loadResource()

    }

    log.info("Trying to find Dozer configuration file: {}", propFileName);
    // Load prop file. Prop file is optional, so if it's not found just use defaults
    DozerClassLoader classLoader = BeanContainer.getInstance().getClassLoader();
    URL url = classLoader.loadResource(propFileName);
    if (url == null) {
      log.warn("Dozer configuration file not found: {}.  Using defaults for all Dozer global properties.", propFileName);
      return;
    } else {
      log.info("Using URL [{}] for Dozer global property configuration", url);
View Full Code Here

Examples of org.jboss.classloading.plugins.AbstractClassLoadingDomain.loadResource()

   }

   public void testLoadResource() throws Exception
   {
      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
      URL resource = domain.loadResource("java/lang/String.class", null);
      assertNotNull(resource);
   }

   public void testLoadResourceFailed() throws Exception
   {
View Full Code Here

Examples of org.jboss.classloading.plugins.AbstractClassLoadingDomain.loadResource()

   }

   public void testLoadResourceFailed() throws Exception
   {
      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
      URL resource = domain.loadResource("java/lang/rubbish", null);
      assertNull(resource);
   }
  
   public void testClassCache() throws Exception
   {
View Full Code Here

Examples of org.jboss.classloading.plugins.AbstractClassLoadingDomain.loadResource()

      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
      SimpleClassLoader scl = new SimpleClassLoader();
      scl.addResource("xyzzy/Hello", new URL("file:///"));
      domain.addDomainClassLoader(new DelegatingDomainClassLoader(scl));
     
      URL url = domain.loadResource("xyzzy/Hello", null);
      assertNotNull(url);
     
      ClassLoaderStats stats = (ClassLoaderStats) scl.requests.get("xyzzy/Hello");
      assertNotNull(stats);
      assertEquals(1, stats.getResource);
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.