|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.javascript.jscomp.deps.JsFileLineParser
com.google.javascript.jscomp.deps.DepsFileParser
public class DepsFileParser
A parser that can extract dependency information from existing deps.js files.
See //javascript/closure/deps.js for an example file.
| Constructor Summary | |
|---|---|
DepsFileParser(ErrorManager errorManager)
Constructor |
|
| Method Summary | |
|---|---|
List<DependencyInfo> |
parseFile(String filePath)
Parses the given file and returns a list of dependency information that it contained. |
List<DependencyInfo> |
parseFile(String filePath,
String fileContents)
Parses the given file and returns a list of dependency information that it contained. |
List<DependencyInfo> |
parseFileReader(String filePath,
Reader reader)
Parses the file from the given reader and returns a list of dependency information that it contained. |
protected boolean |
parseLine(String line)
Extracts dependency information from lines that look like goog.addDependency('pathRelativeToClosure', ['provides'], ['requires']); Adds the dependencies to depInfos. |
| Methods inherited from class com.google.javascript.jscomp.deps.JsFileLineParser |
|---|
didParseSucceed, setShortcutMode |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DepsFileParser(ErrorManager errorManager)
errorManager - Handles parse errors.| Method Detail |
|---|
public List<DependencyInfo> parseFile(String filePath)
throws IOException
filePath - Path to the file to parse.
IOException - Thrown if the file could not be read.
public List<DependencyInfo> parseFile(String filePath,
String fileContents)
filePath - Path to the file to parse.fileContents - The contents to parse.
public List<DependencyInfo> parseFileReader(String filePath,
Reader reader)
filePath - Path to the file to parse.reader - A reader for the file.
protected boolean parseLine(String line)
throws com.google.javascript.jscomp.deps.JsFileLineParser.ParseException
line - The line to parse.
ParseException - Thrown if the given line has a malformed
goog.addDependency().
com.google.javascript.jscomp.deps.JsFileLineParser.ParseException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||