public static class CodingConvention.AssertionFunctionSpec extends Object
| Modifier and Type | Field and Description |
|---|---|
protected JSType |
assertedNewType |
protected JSTypeNative |
assertedType |
protected String |
functionName |
| Constructor and Description |
|---|
AssertionFunctionSpec(String functionName)
Deprecated.
|
AssertionFunctionSpec(String functionName,
JSType assertedNewType) |
AssertionFunctionSpec(String functionName,
JSType assertedNewType,
JSTypeNative assertedType) |
| Modifier and Type | Method and Description |
|---|---|
JSType |
getAssertedNewType(Node call,
DeclaredTypeRegistry scope)
Returns the new type system type for a type assertion.
|
JSType |
getAssertedOldType(Node call,
JSTypeRegistry registry)
Returns the old type system type for a type assertion, or null if
the function asserts that the node must not be null or undefined.
|
Node |
getAssertedParam(Node firstParam)
Returns the parameter of the assertion function that is being checked.
|
String |
getFunctionName()
Returns the name of the function.
|
protected final String functionName
protected final JSTypeNative assertedType
protected final JSType assertedNewType
@Deprecated public AssertionFunctionSpec(String functionName)
public AssertionFunctionSpec(String functionName, JSType assertedNewType, JSTypeNative assertedType)
public String getFunctionName()
public Node getAssertedParam(Node firstParam)
firstParam - The first parameter of the function call.public JSType getAssertedOldType(Node call, JSTypeRegistry registry)
call - The asserting callpublic JSType getAssertedNewType(Node call, DeclaredTypeRegistry scope)
call - The asserting callCopyright © 2009-2015 Google. All Rights Reserved.