# addGenerator method

void addGenerator(

1. ExitCodeGenerator generator

)

Adds a single ExitCodeGenerator and ensures all generators are ordered using AnnotationAwareOrderComparator.

Example:

    generators.addGenerator(MyExitCodeGenerator());

## Implementation

    void addGenerator(ExitCodeGenerator generator) {
      _generators.add(generator);
      AnnotationAwareOrderComparator.sort(this._generators);
    }