@ SuppressWarnings ( "unchecked" ) public < A extends SimpleAggregator > A createSimple ( String name , Class < ? extends Aggregator > klass ) { Utils . checkState ( ! started , "Already started" ) ; try { A aggregator = ( A ) CONSTRUCTORS . get ( klass ) . newInstance ( name ) ; dataProvider . addAggregator ( aggregator ) ; aggregator . setDataProvider ( dataProvider ) ; return aggregator ; } catch ( Exception ex ) { throw new RuntimeException ( ex ) ; } }
Creates a simple Aggregator .