Examples of ResourceLoader


Examples of bitronix.tm.resource.ResourceLoader

        resourcesTree.addMouseListener(new MouseAdapter() {
            public void mouseClicked(MouseEvent evt) {
                JTree tree = (JTree) evt.getSource();
                int selectedRow = tree.getSelectionRows()[0] -1;

                ResourceLoader resourceLoader = TransactionManagerServices.getResourceLoader();
                Iterator it = resourceLoader.getResources().entrySet().iterator();
                ResourceBean resource = null;
                for (int i=0; i<selectedRow+1 ;i++) {
                    Map.Entry entry = (Map.Entry) it.next();
                    resource = (ResourceBean) entry.getValue();
                }
View Full Code Here

Examples of com.asual.lesscss.loader.ResourceLoader

  public LessEngine(LessOptions options) {
    this(options, defaultResourceLoader(options));
  }

  private static ResourceLoader defaultResourceLoader(LessOptions options) {
    ResourceLoader resourceLoader = new ChainedResourceLoader(
        new FilesystemResourceLoader(), new ClasspathResourceLoader(
            LessEngine.class.getClassLoader()),
        new HTTPResourceLoader());
    if(options.isCss()) {
      return new CssProcessingResourceLoader(resourceLoader);     
View Full Code Here

Examples of com.betfair.cougar.codegen.resource.ResourceLoader

    private void initResourceLoader() throws MojoExecutionException {

      try {
          if (isIddAsResource()) {
            // we need this classLoader because it's the only way to get to the project dependencies
            resourceLoader = new ResourceLoader(getRuntimeClassPath());
          }
          else {
            resourceLoader = new ResourceLoader();
          }
      }
      catch (Exception e) {
        throw new MojoExecutionException("Error initialising classloader: " + e, e);
      }
View Full Code Here

Examples of com.caucho.loader.ResourceLoader

    }
  }

  public void addResourceRoot(Path path)
  {
    ResourceLoader loader = new ResourceLoader(_classLoader, path);
    loader.init();
  }
View Full Code Here

Examples of com.google.gwt.dev.cfg.ResourceLoader

    // make sure we get the latest version of any modified jar
    ZipFileClassPathEntry.clearCache();
    ResourceOracleImpl.clearCache();

    ResourceLoader resources = ResourceLoaders.forClassLoader(Thread.currentThread());
    resources = ResourceLoaders.forPathAndFallback(options.getSourcePath(), resources);
    this.resourceLoader.set(resources);

    // ModuleDefLoader.loadFromResources() checks for modified .gwt.xml files.
    ModuleDef moduleDef = ModuleDefLoader.loadFromResources(
View Full Code Here

Examples of com.sun.xml.ws.api.ResourceLoader

    private MetroConfig appConfig;
    private URL appConfigUrl;

    MetroConfigLoader(Container container, MetroConfigName defaultTubesConfigNames) {
        this.defaultTubesConfigNames = defaultTubesConfigNames;
        ResourceLoader spiResourceLoader = null;
        if (container != null) {
            spiResourceLoader = container.getSPI(ResourceLoader.class);
        }
        // if spi resource can't load resource, default (MetroConfigUrlLoader) is used;
        // it searches the classpath, so it would be most probably used
View Full Code Here

Examples of cucumber.runtime.io.ResourceLoader

        final Collection<ResourceLoader> customLoaders = new LinkedList<ResourceLoader>();
        if (additionalFeaturesAnn != null) {
            final Class<? extends ResourceLoader>[] userLoaders = additionalFeaturesAnn.loaders();
            for (final Class<? extends ResourceLoader> resourceLoader : userLoaders) {
                try {
                    final ResourceLoader instance = resourceLoader.newInstance();
                    customLoaders.add(instance);
                } catch (final Exception e) {
                    throw new IllegalArgumentException("can't create a " + resourceLoader.getName(), e);
                }
            }
        }

        for (final String raw : findFeatures(javaClass)) {
            final Collection<URL> list = new ArrayList<URL>();

            int lineIdx = raw.lastIndexOf(':');
            final String path;
            final String suffix;
            if (lineIdx > 0 && lineIdx + 1 != MultiLoader.CLASSPATH_SCHEME.length()) {
                path = raw.substring(0, lineIdx);
                suffix = raw.substring(lineIdx);
            } else {
                suffix = "";
                path = raw;
            }

            final boolean directResource = path.endsWith(EXTENSION);

            if (directResource) {
                { // from classpath
                    final URL url = loader.getResource(path);
                    if (url != null) {
                        list.add(url);
                        featureUrls.put(raw + suffix, list);
                        continue;
                    }
                }

                // from filesystem
                if (urlFromFileSystem(featureUrls, list, path, path, suffix)) {
                    continue;
                }

                // from filesystem with featureHome
                if (home != null && urlFromFileSystem(featureUrls, list, path, featureHome + path, suffix)) {
                    continue;
                }

                for (final ResourceLoader instance : customLoaders) {
                    for (final Resource r : instance.resources(path.substring(0, path.length() - EXTENSION.length()), EXTENSION)) {
                        try {
                            final String feature = new String(slurp(r.getInputStream()));
                            final String featurePath = r.getPath();
                            final File featureDump = dump(tempDir, javaClass.getName() + '/' + featurePath, feature);
                            featureDump.deleteOnExit();
                            featureUrls.put(featurePath, asList(featureDump.toURI().toURL()));
                        } catch (final IOException e) {
                            throw new IllegalStateException(e);
                        }
                    }
                }
            }

            findWithCucumberSearcher(loader, path, list);
            if (home != null) {
                findWithCucumberSearcher(loader, home + path, list);
            }

            if (!list.isEmpty()) {
                featureUrls.put(path + suffix, list);
            }
        }

        for (final ResourceLoader instance : customLoaders) {
            try {
                for (final Resource r : instance.resources(null, EXTENSION)) {
                    try {
                        final String feature = new String(slurp(r.getInputStream()));
                        final String featurePath = r.getPath();
                        final File featureDump = dump(tempDir, javaClass.getName() + '/' + featurePath, feature);
                        featureDump.deleteOnExit();
View Full Code Here

Examples of de.zelosfan.framework.IO.ResourceLoader

    @Override
    public void create() {
        LogManager.DEFAULT_LOGLEVEL = Application.LOG_DEBUG;
        Gdx.app.setLogLevel(Application.LOG_DEBUG);

        resourceLoader = new ResourceLoader();
        resourceLoader.loadImagePackIntoTextureRegions("tiles.pack", textureRegionObjectMap);
        resourceLoader.loadImagePackIntoTextureRegions("pics.pack", textureRegionObjectMap);
        resourceLoader.loadImagePackIntoTextureRegions("ui.pack", textureRegionObjectMap);
        resourceLoader.loadImagePackIntoTextureRegions("entities.pack", textureRegionObjectMap);
        ResourceLoader.loadShaders("shader/", shaderProgramObjectMap);
View Full Code Here

Examples of flex.messaging.util.ResourceLoader

     * @param arguments The arguments to substitute into the error message.
     */
    public void setMessage(int number, String variant, Locale locale, Object[] arguments)
    {
        setNumber(number);
        ResourceLoader resources = getResourceLoader();
        setMessage(resources.getString(generateFullKey(number, variant), locale, arguments));
    }
View Full Code Here

Examples of jetbrick.template.resource.loader.ResourceLoader

        }
    }

    private ResourceLoader createResourceLoader() {
        try {
            ResourceLoader resourceLoader;
            if (config.getCompileStrategy() == CompileStrategy.none) {
                // 这种情况下,使用自定义的 ResourceLoader
                resourceLoader = new CompiledClassResourceLoader();
            } else {
                resourceLoader = (ResourceLoader) config.getTemplateLoader().newInstance();
            }
            resourceLoader.initialize(this, config.getTemplatePath(), config.getInputEncoding());
            return resourceLoader;
        } catch (Exception e) {
            throw ExceptionUtils.uncheck(e);
        }
    }
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.