public Object getNext ( KCall call ) { if ( map . get ( call . getProcedure ( ) . getId ( ) ) == null ) { Object context = call . getProcess ( ) . getContext ( ) ; // getting data by reflection Method readMethod = null ; try { readMethod = new PropertyDescriptor ( pipelineDataName , context . getClass ( ) ) . getReadMethod ( ) ; } catch ( IntrospectionException e ) { MessageKind . W0003 . format ( e ) ; } Object invoke = null ; try { invoke = readMethod . invoke ( context ) ; } catch ( IllegalArgumentException e ) { MessageKind . W0003 . format ( e ) ; } catch ( IllegalAccessException e ) { MessageKind . W0003 . format ( e ) ; } catch ( InvocationTargetException e ) { MessageKind . W0003 . format ( e ) ; } // putting new Iterator into map if ( invoke instanceof Iterable < ? > ) { Iterator newIterator = ( ( Iterable ) invoke ) . iterator ( ) ; this . add ( call . getProcedure ( ) . getId ( ) , newIterator ) ; } } Iterator iterator = map . get ( call . getProcedure ( ) . getId ( ) ) ; return iterator . next ( ) ; }
Based on KProcedure index for data it will return next value from list