Package com.google.javascript.rhino.jstype

# Class RecordTypeBuilder

java.lang.Object
com.google.javascript.rhino.jstype.RecordTypeBuilder

public class RecordTypeBuilder extends Object
A builder for record types.

## Constructor Summary

Constructors
Constructor
Description
`RecordTypeBuilder(JSTypeRegistry registry)`

## Method Summary

Modifier and Type
Method
Description
`RecordTypeBuilder`
`addProperty(String name, JSType type, Node propertyNode)`
Adds a property with the given name and type to the record type.
`JSType`
`build()`
Creates a record.

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

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

## Constructor Details

### RecordTypeBuilder

public RecordTypeBuilder(JSTypeRegistry registry)

## Method Details

### addProperty

public RecordTypeBuilder addProperty(String name, JSType type, Node propertyNode)
Adds a property with the given name and type to the record type.

Parameters:
  `name` - the name of the new property
  `type` - the JSType of the new property
  `propertyNode` - the node that holds this property definition
Returns:
  The builder itself for chaining purposes, or null if there's a duplicate.

### build

public JSType build()
Creates a record.

Returns:
  The record type.