public List < CommandCallback > buildCommandCallback ( CommandContext ctx , ClassLoader cl ) { List < CommandCallback > callbackList = new ArrayList < CommandCallback > ( ) ; if ( ctx != null && ctx . getData ( "callbacks" ) != null ) { logger . debug ( "Callback: {}" , ctx . getData ( "callbacks" ) ) ; String [ ] callbacksArray = ( ( String ) ctx . getData ( "callbacks" ) ) . split ( "," ) ; List < String > callbacks = ( List < String > ) Arrays . asList ( callbacksArray ) ; for ( String callbackName : callbacks ) { CommandCallback handler = findCommandCallback ( callbackName . trim ( ) , cl ) ; callbackList . add ( handler ) ; } } return callbackList ; }
Builds completely initialized list of callbacks for given context .