org.millscript.millscript.loaders
Class LoaderBuilder

java.lang.Object
  extended by org.millscript.millscript.loaders.LoaderBuilder

public class LoaderBuilder
extends java.lang.Object

This class is responsible for building an appropriate MillScript loader for a given file extension.


Constructor Summary
LoaderBuilder()
           
 
Method Summary
 void addLoader(java.lang.String extension, java.lang.Class loaderClass)
          Adds the specified Loader to this builder.
 void addLoader(java.lang.String extension, Loader loader)
          Adds the specified Loader to this builder.
 Loader getLoaderFor(Package p, org.millscript.commons.vfs.VEntry entry)
          Returns a Loader for the specified virtual filesystem entry, to load into the specified package.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoaderBuilder

public LoaderBuilder()
Method Detail

addLoader

public void addLoader(java.lang.String extension,
                      java.lang.Class loaderClass)
Adds the specified Loader to this builder.

Parameters:
extension - the extension for the new Loader
loaderClass - the Loader for the specified extension

addLoader

public void addLoader(java.lang.String extension,
                      Loader loader)
Adds the specified Loader to this builder.

Parameters:
extension - the extension for the new Loader
loader - the Loader for the specified extension

getLoaderFor

public Loader getLoaderFor(Package p,
                           org.millscript.commons.vfs.VEntry entry)
Returns a Loader for the specified virtual filesystem entry, to load into the specified package.

Parameters:
p - the Package to load into
entry - the virtual entry to get a Loader for
Returns:
a Loader for the specified file


Copyright © 2001-2007 Open World Ltd. All Rights Reserved.