org.eclipse.wst.jsdt.chromium.debug.core.sourcemap

## Interface SourcePositionMapBuilder

All Known Implementing Classes:
  PositionMapBuilderImpl

    public interface SourcePositionMapBuilder

A builder for `SourcePositionMap`. The builder pattern is reduced to a "single builder -- single product" case. A product can be used and built in turn.

### Nested Class Summary

Nested Classes
`static class` `SourcePositionMapBuilder.CannotAddException`
`static interface` `SourcePositionMapBuilder.MappingHandle` A handle that gives control over created mapping.
`static class` `SourcePositionMapBuilder.ResourceSection` Defines a section of a source file, contains a resource id and start and end point in text.

### Method Summary

All Methods Instance Methods Abstract Methods
`SourcePositionMapBuilder.MappingHandle` `addMapping(SourcePositionMapBuilder.ResourceSection originalSection, SourcePositionMapBuilder.ResourceSection vmSection, TextSectionMapping fromOriginalToVmSectionMapping)` Adds a new mapping between 2 resource sections.
`SourcePositionMap` `getSourcePositionMap()` Returns an instance of map.

### Method Detail

#### getSourcePositionMap

    SourcePositionMap getSourcePositionMap()

Returns an instance of map. The instance is permanent, the builder does not support multiple products.

#### addMapping

    SourcePositionMapBuilder.MappingHandle addMapping(SourcePositionMapBuilder.ResourceSection originalSection,
                                                      SourcePositionMapBuilder.ResourceSection vmSection,
                                                      TextSectionMapping fromOriginalToVmSectionMapping)
                                               throws SourcePositionMapBuilder.CannotAddException

Adds a new mapping between 2 resource sections.

Parameters:
  `originalSection` - a section of "original" resource
  `vmSection` - a section of "vm" resource
  `fromOriginalToVmSectionMapping` - defines internal mapping inside "original" and "vm" sections
Returns:
  a handle that could be used to control a created mapping
Throws:
  `SourcePositionMapBuilder.CannotAddException`