public final class ObjectPropertyStringPreprocess extends java.lang.Object implements CompilerPass
new goog.testing.ObjectPropertyString(foo, 'bar')
to
new JSCompiler_ObjectPropertyString(window, foo.bar)
.
These two passes are for use with goog.testing.PropertyReplacer.
var ops = new goog.testing.ObjectPropertyString(foo.prototype, 'bar');
propertyReplacer.set(ops,object, ops.propertyString, baz);
ObjectPropertyStringPostprocess
Modifier and Type | Class and Description |
---|---|
private class |
ObjectPropertyStringPreprocess.Callback |
Modifier and Type | Field and Description |
---|---|
private AbstractCompiler |
compiler |
static java.lang.String |
EXTERN_OBJECT_PROPERTY_STRING |
(package private) static DiagnosticType |
INVALID_NUM_ARGUMENTS_ERROR |
(package private) static java.lang.String |
OBJECT_PROPERTY_STRING |
(package private) static DiagnosticType |
QUALIFIED_NAME_EXPECTED_ERROR |
(package private) static DiagnosticType |
STRING_LITERAL_EXPECTED_ERROR |
Constructor and Description |
---|
ObjectPropertyStringPreprocess(AbstractCompiler compiler) |
Modifier and Type | Method and Description |
---|---|
private static void |
addExternDeclaration(Node externs,
Node declarationStmt) |
void |
process(Node externs,
Node root)
Process the JS with root node root.
|
static final java.lang.String OBJECT_PROPERTY_STRING
public static final java.lang.String EXTERN_OBJECT_PROPERTY_STRING
static final DiagnosticType INVALID_NUM_ARGUMENTS_ERROR
static final DiagnosticType QUALIFIED_NAME_EXPECTED_ERROR
static final DiagnosticType STRING_LITERAL_EXPECTED_ERROR
private final AbstractCompiler compiler
ObjectPropertyStringPreprocess(AbstractCompiler compiler)
public void process(Node externs, Node root)
CompilerPass
process
in interface CompilerPass
externs
- Top of external JS treeroot
- Top of JS tree