Package com.google.javascript.jscomp.deps

# Class JsFunctionParser

java.lang.Object
com.google.javascript.jscomp.deps.JsFileLineParser
com.google.javascript.jscomp.deps.JsFunctionParser

public class JsFunctionParser extends JsFileLineParser
A parser that can extract dependency information from a .js file.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`JsFunctionParser.SymbolInfo`

## Constructor Summary

Constructors
Constructor
Description
`JsFunctionParser(Collection<String> functions, ErrorManager errorManager)`
Constructor

## Method Summary

Modifier and Type
Method
Description
`Collection<JsFunctionParser.SymbolInfo>`
`parseFile(String filePath, String fileContents)`
Parses the given file and returns the dependency information that it contained.
`protected boolean`
`parseLine(String line)`
Parses a line of JavaScript, extracting dependency information.

### 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 Details

### JsFunctionParser

public JsFunctionParser(Collection<String> functions, ErrorManager errorManager)
Constructor

Parameters:
  `functions` - Functions to parse.
  `errorManager` - Handles parse errors.

## Method Details

### parseFile

public Collection<JsFunctionParser.SymbolInfo> parseFile(String filePath, String fileContents)
Parses the given file and returns the dependency information that it contained.

Parameters:
  `filePath` - Path to the file to parse.
  `fileContents` - The contents to parse.
Returns:
  A collection containing all symbols found in the file.

### parseLine

protected boolean parseLine(String line) throws com.google.javascript.jscomp.deps.JsFileLineParser.ParseException
Parses a line of JavaScript, extracting dependency information.

Throws:
  `com.google.javascript.jscomp.deps.JsFileLineParser.ParseException`