public void addWorkContext ( Class < ? extends WorkContext > workContextClass , WorkContext workContext ) { if ( workContextClass == null ) { throw new IllegalArgumentException ( "Work context class is null" ) ; } if ( workContext == null ) { throw new IllegalArgumentException ( "Work context is null" ) ; } if ( workContexts == null ) { workContexts = new HashMap < Class < ? extends WorkContext > , WorkContext > ( 1 ) ; } if ( trace ) log . tracef ( "Adding work context %s for %s" , workContextClass , this ) ; workContexts . put ( workContextClass , workContext ) ; }
Adds new work context .