This documentation is for an old version of fiftyfive-wicket (2.0.9).


fiftyfive.wicket.js.locator
Class SprocketDependencyCollector

java.lang.Object
  extended by fiftyfive.wicket.js.locator.SprocketParser
      extended by fiftyfive.wicket.js.locator.SprocketDependencyCollector

public class SprocketDependencyCollector
extends SprocketParser

Parses JavaScript files for sprocket dependencies and recurses to find the dependencies of those, until all are discovered.

Since:
2.0

Constructor Summary
SprocketDependencyCollector(JavaScriptDependencyLocator locator)
          Constructs a instance that will use the given JavaScriptDependencyLocator for recursively loading JavaScript files that are found as dependencies.
 
Method Summary
 void collectDependencies(ResourceReference ref, IResourceStream stream, DependencyCollection dependencies)
          Parse the given JavaScript file stream for sprockets dependency declarations.
 
Methods inherited from class fiftyfive.wicket.js.locator.SprocketParser
parseSprockets
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SprocketDependencyCollector

public SprocketDependencyCollector(JavaScriptDependencyLocator locator)
Constructs a instance that will use the given JavaScriptDependencyLocator for recursively loading JavaScript files that are found as dependencies.

Method Detail

collectDependencies

public void collectDependencies(ResourceReference ref,
                                IResourceStream stream,
                                DependencyCollection dependencies)
Parse the given JavaScript file stream for sprockets dependency declarations. For each dependency that is found, recursively invoke the JavaScriptDependencyLocator to locate the dependency and parse it for its dependencies, and so on. All the scripts that are found as a result of this process will be added to the specified DependencyCollection.

Parameters:
ref - The location of the JavaScript file to parse
stream - An opened stream of the JavaScript file to parse
dependencies - Target collection to which all dependencies will be added


Copyright © 2011 55 Minutes. All Rights Reserved.