ca.jimr.gae.profiler.resources
Class MiniProfilerResourceLoader

java.lang.Object
  extended by ca.jimr.gae.profiler.resources.MiniProfilerResourceLoader

public class MiniProfilerResourceLoader
extends Object

Helper class that loads resources (and does basic string template replacement) on files in the classpath.

Once loaded (and replacements done), the files will be cached indefinitely.


Constructor Summary
MiniProfilerResourceLoader()
           
 
Method Summary
 String getResource(String resource, Map<String,String> replacements)
          Get the specified resource (if it exists) and perform the specified string replacements on it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MiniProfilerResourceLoader

public MiniProfilerResourceLoader()
Method Detail

getResource

public String getResource(String resource,
                          Map<String,String> replacements)
Get the specified resource (if it exists) and perform the specified string replacements on it.

Parameters:
resource - The name of the resource to load.
replacements - The map of string replacements to do.
Returns:
The text of the resource, or null if it could not be loaded.


Copyright © 2011-2013. All Rights Reserved.