content-parser/api/src/main/java/net/sf/mmm/content/parser/base/AbstractContentParserService.java
/**
   * This method registers the given <code>parser</code> for the given
   * <code>extension</code>.
   * 
   * @see #getParser(String)
   * 
   * @param parser is the parser to register.
   * @param keys are the extensions the parser will be associated with.
   */
This method registers the given parser for the given
extension.



@param parser is the parser to register.
@param keys are the extensions the parser will be associated with.
This method registers the given parser for the given extension . @param parser is the parser to register . @param keys are the extensions the parser will be associated with .
public void addParser(ContentParser parser, String... keys) {
    if (keys.length == 0) {
      throw new NlsIllegalArgumentException("keys.length (0)");
    }
    for (int i = 0; i < keys.length; i++) {
      if (this.primaryKey2parserMap.containsKey(keys[i])) {
        throw new DuplicateObjectException(parser, keys[i]);
      }
      this.primaryKey2parserMap.put(keys[i], parser);
    }
  }
public void addParser ( ContentParser parser , String ... keys ) { if ( keys . length == 0 ) { throw new NlsIllegalArgumentException ( "keys.length (0)" ) ; } for ( int i = 0 ; i < keys . length ; i ++ ) { if ( this . primaryKey2parserMap . containsKey ( keys [ i ] ) ) { throw new DuplicateObjectException ( parser , keys [ i ] ) ; } this . primaryKey2parserMap . put ( keys [ i ] , parser ) ; } }
This method registers the given <code>parser</code> for the given
 <code>extension</code>.
This method registers the given <code > parser< / code > for the given <code > extension< / code > .
// This method is called for injection after initialization // can NOT do: getInitializationState().requireNotInitilized(); // TODO NLS