public static class CodingConvention.AssertionFunctionSpec
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected JSTypeNative |
assertedType |
protected java.lang.String |
functionName |
Constructor and Description |
---|
AssertionFunctionSpec(java.lang.String functionName)
Deprecated.
|
AssertionFunctionSpec(java.lang.String functionName,
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.
|
java.lang.String |
getFunctionName()
Returns the name of the function.
|
protected final java.lang.String functionName
protected final JSTypeNative assertedType
@Deprecated public AssertionFunctionSpec(java.lang.String functionName)
public AssertionFunctionSpec(java.lang.String functionName, JSTypeNative assertedType)
public java.lang.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-2017 Google. All Rights Reserved.