Package com.google.javascript.jscomp

# Class ClosureCodingConvention.AssertInstanceofSpec

java.lang.Object
com.google.javascript.jscomp.CodingConvention.AssertionFunctionSpec
com.google.javascript.jscomp.ClosureCodingConvention.AssertInstanceofSpec

Enclosing class:
  `ClosureCodingConvention`

public static class ClosureCodingConvention.AssertInstanceofSpec extends CodingConvention.AssertionFunctionSpec
A function that will throw an exception when if the value is not an instanceof a specific type.

## Field Summary

### Fields inherited from class com.google.javascript.jscomp.CodingConvention.AssertionFunctionSpec

`assertedType, functionName`

## Constructor Summary

Constructors
Constructor
Description
`AssertInstanceofSpec(String functionName)`

## Method Summary

Modifier and Type
Method
Description
`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.

### Methods inherited from class com.google.javascript.jscomp.CodingConvention.AssertionFunctionSpec

`getAssertedParam, getFunctionName`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### AssertInstanceofSpec

public AssertInstanceofSpec(String functionName)

## Method Details

### getAssertedType

public 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.

Overrides:
  `getAssertedType` in class `CodingConvention.AssertionFunctionSpec`
Parameters:
  `call` - The asserting call