Package com.io7m.cedarbridge.schema.compiled

# Interface CBPackageBuilderType

All Known Implementing Classes:
  `CBPackageBuilder`

public interface CBPackageBuilderType
The type of package builders.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CBPackageBuilderType`
  `addImport(CBPackageType imported)`
  Import a package.
  `CBPackageType`
  `build()`
  Build a package based on all of the given values so far.
  `CBTypeDeclarationBuilderType`
  `createExternalType(String externalPackageName, String externalName, String name)`
  Create a new external type declaration.
  `CBProtocolBuilderType`
  `createProtocol(String name)`
  Create a new protocol.
  `CBRecordBuilderType`
  `createRecord(String name)`
  Create a new record.
  `CBVariantBuilderType`
  `createVariant(String name)`
  Create a new variant.
  `CBRecordBuilderType`
  `findRecord(String name)`
  Find an existing record.
  `CBTypeDeclarationBuilderType`
  `findType(String name)`
  Find an existing type.
  `CBVariantBuilderType`
  `findVariant(String name)`
  Find an existing variant.
  `CBTypeExpressionType.CBTypeExprNamedType`
  `referenceExternalType(CBTypeDeclarationType typeDeclaration)`
  Reference an external type.
  `CBTypeExpressionType.CBTypeExprNamedType`
  `referenceType(String name)`
  Reference an existing type.

- ## Method Details

  - ### createExternalType

    CBTypeDeclarationBuilderType createExternalType(String externalPackageName, String externalName, String name)
    Create a new external type declaration.
    Parameters:
      `externalPackageName` - The external package name
      `externalName` - The external type name
      `name` - The name within this package
    Returns:
      A type declaration builder

  - ### createRecord

    CBRecordBuilderType createRecord(String name)
    Create a new record.
    Parameters:
      `name` - The name within this package
    Returns:
      A record builder

  - ### findRecord

    CBRecordBuilderType findRecord(String name)
    Find an existing record.
    Parameters:
      `name` - The name within this package
    Returns:
      A record builder

  - ### createVariant

    CBVariantBuilderType createVariant(String name)
    Create a new variant.
    Parameters:
      `name` - The name within this package
    Returns:
      A variant builder

  - ### findVariant

    CBVariantBuilderType findVariant(String name)
    Find an existing variant.
    Parameters:
      `name` - The name within this package
    Returns:
      A record builder

  - ### findType

    CBTypeDeclarationBuilderType findType(String name)
    Find an existing type.
    Parameters:
      `name` - The name within this package
    Returns:
      A type builder

  - ### referenceType

    CBTypeExpressionType.CBTypeExprNamedType referenceType(String name)
    Reference an existing type.
    Parameters:
      `name` - The name within this package
    Returns:
      A named type expression

  - ### referenceExternalType

    CBTypeExpressionType.CBTypeExprNamedType referenceExternalType(CBTypeDeclarationType typeDeclaration)
    Reference an external type.
    Parameters:
      `typeDeclaration` - The type declaration
    Returns:
      A named type expression

  - ### build

    CBPackageType build()
    Build a package based on all of the given values so far.
    Returns:
      A package

  - ### addImport

    CBPackageBuilderType addImport(CBPackageType imported)
    Import a package.
    Parameters:
      `imported` - The package
    Returns:
      this

  - ### createProtocol

    CBProtocolBuilderType createProtocol(String name)
    Create a new protocol.
    Parameters:
      `name` - The name within this package
    Returns:
      A protocol builder