Examples of ResourceLoader


Examples of jfun.yan.util.resource.ResourceLoader

    return ResourceLoaders.or(cloader, interpreter.getResourceLoader());
  }
  private void loadNuts(ClassLoader loader,
      String resource, Map nuts)
  throws IOException, ClassNotFoundException, IntrospectionException{
    final ResourceLoader rloader = getResourceLoader(loader);
    final InputStream in = rloader.getResourceAsStream(resource);
    if(in == null)
      throw new IllegalStateException("could not find "
        + resource);
    try{
      final Properties props = new Properties();
View Full Code Here

Examples of net.sertik.genesia.resource.ResourceLoader

  }

  public void askNextPlayerName(int player) {
    if (player == 3 || game.getPlayers().get(player).getComputer()) {
//      ResourceLoader resourceLoader = new PolygonResourceLoader(game.getWorld());
      ResourceLoader resourceLoader = new ImageResourceLoader(game.getWorld());
//      Renderer renderer = new SimpleRenderer();
      Renderer renderer = new QuadTreeRenderer(resourceLoader, game.getWorld());

      MainGame mainGame = new MainGame(this, renderer, screenWidth, screenHeight);
View Full Code Here

Examples of org.apache.flex.forks.velocity.runtime.resource.loader.ResourceLoader

    {
        rsvc = rs;
       
        rsvc.info("Default ResourceManager initializing. (" + this.getClass() + ")");

        ResourceLoader resourceLoader;
       
        assembleResourceLoaderInitializers();
       
        for (int i = 0; i < sourceInitializerList.size(); i++)
        {
            ExtendedProperties configuration = (ExtendedProperties) sourceInitializerList.get(i);
            String loaderClass = configuration.getString("class");

            if ( loaderClass == null)
            {
                rsvc.error"Unable to find '"
                                + configuration.getString(RESOURCE_LOADER_IDENTIFIER)
                                + ".resource.loader.class' specification in configuation."
                                + " This is a critical value.  Please adjust configuration.");
                continue;
            }

            resourceLoader = ResourceLoaderFactory.getLoader( rsvc, loaderClass);
            resourceLoader.commonInit( rsvc, configuration);
            resourceLoader.init(configuration);
            resourceLoaders.add(resourceLoader);

        }

        /*
 
View Full Code Here

Examples of org.apache.logging.log4j.core.util.ResourceLoader

            plugins = REGISTRY.getCategory(category);
            preLoad = false;
        }
        long start = System.nanoTime();
        if (preLoad) {
            final ResourceLoader loader = new ClassLoaderResourceLoader(Loader.getClassLoader());
            loadPlugins(loader);
        }
        plugins = REGISTRY.getCategory(category);
        loadFromPackages(start, preLoad);
View Full Code Here

Examples of org.apache.lucene.analysis.util.ResourceLoader

  public void testLoadRules() throws Exception {
    Map<String, String> args = new HashMap<String, String>();
    args.put( "synonyms", "something.txt" );
    SlowSynonymFilterFactory ff = new SlowSynonymFilterFactory(args);
    ff.inform( new ResourceLoader() {

      @Override
      public <T> T newInstance(String cname, Class<T> expectedType) {
        throw new RuntimeException("stub");
      }
View Full Code Here

Examples of org.apache.lucene.analysis.util.ResourceLoader

   * @throws IOException
   */
  public static Analyzer buildAnalyzer(AnalyzerDef analyzerDef,
      Version luceneMatchVersion,
      ServiceManager serviceManager) throws IOException {
    ResourceLoader defaultResourceLoader = new HibernateSearchResourceLoader( serviceManager );
    TokenizerDef token = analyzerDef.tokenizer();
    final Map<String, String> tokenMapsOfParameters = getMapOfParameters( token.params(), luceneMatchVersion );
    TokenizerFactory tokenFactory = instanceFromClass(
        TokenizerFactory.class,
        token.factory(),
View Full Code Here

Examples of org.apache.myfaces.shared.resource.ResourceLoader

    @Test
    public void testDeriveResourceMeta1() throws Exception
    {
        application.setMessageBundle("org/apache/myfaces/application/resourcehandler/messages");
       
        ResourceLoader loader = new ResourceLoader("/resources") {

            @Override
            public String getResourceVersion(String path)
            {
                return null;
View Full Code Here

Examples of org.apache.myfaces.trinidad.resource.ResourceLoader

  protected void doGet(
    HttpServletRequest request,
    HttpServletResponse response
    ) throws ServletException, IOException
  {
    ResourceLoader loader = _getResourceLoader(request);
    String resourcePath = getResourcePath(request);
    URL url = loader.getResource(resourcePath);

    // Make sure the resource is available
    if (url == null)
    {
      response.sendError(HttpServletResponse.SC_NOT_FOUND);
View Full Code Here

Examples of org.apache.myfaces.trinidad.resource.ResourceLoader

  protected long getLastModified(
    HttpServletRequest request)
  {
    try
    {
      ResourceLoader loader = _getResourceLoader(request);
      String resourcePath = getResourcePath(request);
      URL url = loader.getResource(resourcePath);

      if (url == null)
        return super.getLastModified(request);

      URLConnection connection = url.openConnection();
View Full Code Here

Examples of org.apache.myfaces.trinidad.resource.ResourceLoader

   */
  private ResourceLoader _getResourceLoader(
    HttpServletRequest request)
  {
    final String servletPath = request.getServletPath();
    ResourceLoader loader = _loaders.get(servletPath);

    if (loader == null)
    {
      try
      {
        String key = "META-INF/servlets/resources" +
                    servletPath +
                    ".resources";
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        URL url = cl.getResource(key);

        if (url != null)
        {
          Reader r = new InputStreamReader(url.openStream());
          BufferedReader br = new BufferedReader(r);
          try
          {
            String className = br.readLine().trim();
            Class<?> clazz = cl.loadClass(className);
            try
            {
              Constructor<?> decorator = clazz.getConstructor(_DECORATOR_SIGNATURE);
              ServletContext context = getServletContext();
              File tempdir = (File)
                context.getAttribute("javax.servlet.context.tempdir");
              ResourceLoader delegate = new DirectoryResourceLoader(tempdir);
              loader = (ResourceLoader)
                decorator.newInstance(new Object[]{delegate});
            }
            catch (InvocationTargetException 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.