public abstract class GoogRequire extends Object implements Comparable<GoogRequire>
goog.require statement.| Constructor and Description |
|---|
GoogRequire() |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(GoogRequire o) |
static GoogRequire |
create(String symbol)
Creates a new
GoogRequire that requires the given symbol: goog.require('symbol'); |
static GoogRequire |
createWithAlias(String symbol,
String alias)
Creates a new
GoogRequire that requires the given symbol and aliases it to the given
name: var alias = goog.require('symbol'); |
CodeChunk.WithValue |
dotAccess(String ident)
Access a member of this required symbol.
|
CodeChunk.WithValue |
reference()
Returns a code chunk that can act as a reference to the required symbol.
|
abstract String |
symbol()
The symbol to require.
|
void |
writeTo(StringBuilder sb) |
public static GoogRequire create(String symbol)
GoogRequire that requires the given symbol: goog.require('symbol'); public static GoogRequire createWithAlias(String symbol, String alias)
GoogRequire that requires the given symbol and aliases it to the given
name: var alias = goog.require('symbol'); public abstract String symbol()
public CodeChunk.WithValue reference()
public CodeChunk.WithValue dotAccess(String ident)
public void writeTo(StringBuilder sb)
public final int compareTo(GoogRequire o)
compareTo in interface Comparable<GoogRequire>