@ SuppressWarnings ( "unchecked" ) public static < T > IDomainFactory < T > getFactory ( Class < T > clazz ) { for ( IDomainFactory < ? > factory : instance ) { String alias = factory . getAlias ( clazz ) ; if ( alias != null ) { return ( IDomainFactory < T > ) factory ; } } throw new IllegalArgumentException ( "Domain class has no registered factory: " + clazz . getName ( ) ) ; }
Returns a domain factory for the specified class .