ListenerDirective directive = getListenerDirective( name ); list.add( directive );
try { ListenerDirective directive = getListenerDirective( name ); list.add( directive ); } catch( UnknownKeyException e ) {  }
    private ListenerDirective[] getListenerDirectives( String[] names )    {        ArrayList list = new ArrayList();        for( int i=0; i<names.length; i++ )        {            String name = names[i];            ListenerDirective directive = getListenerDirective( name );            list.add( directive );        }        return (ListenerDirective[]) list.toArray( new ListenerDirective[0] );    }