public abstract class ModuleResolver extends Object
Modifier and Type | Field and Description |
---|---|
protected ErrorHandler |
errorHandler |
protected com.google.common.collect.ImmutableSet<String> |
modulePaths
The set of all known input module URIs (including trailing .js), after normalization.
|
protected com.google.common.collect.ImmutableList<String> |
moduleRootPaths
Root URIs to match module roots against.
|
Constructor and Description |
---|
ModuleResolver(com.google.common.collect.ImmutableSet<String> modulePaths,
com.google.common.collect.ImmutableList<String> moduleRootPaths,
ErrorHandler errorHandler) |
Modifier and Type | Method and Description |
---|---|
protected String |
canonicalizePath(String scriptAddress,
String moduleAddress)
Normalizes a module path reference.
|
protected String |
locate(String scriptAddress,
String name)
Locates the module with the given name, but returns null if there is no JS file in the expected
location.
|
abstract String |
resolveJsModule(String scriptAddress,
String moduleAddress,
String sourcename,
int lineno,
int colno) |
protected final com.google.common.collect.ImmutableSet<String> modulePaths
protected final com.google.common.collect.ImmutableList<String> moduleRootPaths
protected final ErrorHandler errorHandler
public ModuleResolver(com.google.common.collect.ImmutableSet<String> modulePaths, com.google.common.collect.ImmutableList<String> moduleRootPaths, ErrorHandler errorHandler)
@Nullable public abstract String resolveJsModule(String scriptAddress, String moduleAddress, String sourcename, int lineno, int colno)
@Nullable protected String locate(String scriptAddress, String name)
Copyright © 2009-2017 Google. All Rights Reserved.