code: function Formatter(indentation) {
  
      // the indentation is a private attribute so methods that use it are defined in the constructor
      indentation = indentation || 0;
      if (typeof indentation !== 'number') {
          throw new Exception({
              $module: '/bali/utilities/Formatter',
              $procedure: '$Formatter',
              $exception: '$invalidParameter',
              $parameter: indentation,
              $text: '"The indentation parameter should be the number of levels to indent."'
          });
      }
  
      this.formatLiteral = function(literal, format) {
          if (!types.isLiteral(literal.getTypeId())) {
              throw new Exception({
                  $module: '/bali/utilities/Formatter',
                  $procedure: '$formatLiteral',
                  $exception: '$invalidParameter',
                  $parameter: literal,
                  $text: '"Attempted to format a non-literal component."'
              });
          }
          const visitor = new FormattingVisitor(indentation, false, format);
          literal.acceptVisitor(visitor);
          return visitor.result;
      };
  
      this.formatComponent = function(component) {
          const visitor = new FormattingVisitor(indentation, true);
          component.acceptVisitor(visitor);
          return visitor.result;
      };
  
      return this;
  }
docs: PUBLIC CONSTRUCTORS 
  This class implements a formatter that uses a visitor to format component structures
  as strings containing Bali Document Notation™ in a canonical way.
  
  @constructor
  @param {Number} indentation The number of levels of indentation that should be inserted
  to each formatted line at the top level. The default is zero, a value of -1 will result
  in an inline formatting.
  @returns {Formatter} The new component formatter.