public void executeProcessors ( JCas jcas , ProcessorManager . Priority prio ) { if ( ! this . initialized ) { Logger . printError ( component , "Unable to execute Processors; initialization was not concluded successfully." ) ; System . exit ( - 1 ) ; } LinkedList < GenericProcessor > myList = processors . get ( prio ) ; for ( GenericProcessor gp : myList ) { try { gp . process ( jcas ) ; } catch ( Exception exception ) { exception . printStackTrace ( ) ; Logger . printError ( component , "Unable to process registered Processor " + gp . getClass ( ) . getName ( ) + ", got: " + exception . toString ( ) ) ; System . exit ( - 1 ) ; } } }
Based on reflection this method instantiates and executes all of the registered Processors .