public static class CodingConvention.AssertionFunctionSpec extends Object
Modifier and Type | Field and Description |
---|---|
protected JSTypeNative |
assertedType |
protected String |
functionName |
Constructor and Description |
---|
CodingConvention.AssertionFunctionSpec(String functionName) |
CodingConvention.AssertionFunctionSpec(String functionName,
JSTypeNative assertedType) |
Modifier and Type | Method and Description |
---|---|
Node |
getAssertedParam(Node firstParam)
Returns the parameter of the assertion function that is being checked.
|
JSType |
getAssertedType(Node call,
JSTypeRegistry registry)
Returns the type for a type assertion, or null if the function asserts
that the node must not be null or undefined.
|
String |
getFunctionName()
Returns the name of the function.
|
protected final String functionName
protected final JSTypeNative assertedType
public CodingConvention.AssertionFunctionSpec(String functionName)
public CodingConvention.AssertionFunctionSpec(String functionName, JSTypeNative assertedType)
public String getFunctionName()
public Node getAssertedParam(Node firstParam)
firstParam
- The first parameter of the function call.public JSType getAssertedType(Node call, JSTypeRegistry registry)
call
- The asserting call