public int register ( T component ) { if ( component == null ) { throw new IllegalArgumentException ( "Null component object passed." ) ; } if ( components . contains ( component ) ) { throw new IllegalArgumentException ( "Duplicate component registering: " + component . getId ( ) ) ; } this . components . add ( component ) ; return this . components . size ( ) - 1 ; }
Registra um novo componente nesta factory .