public void register(Class<? extends Lang> clazz) throws Exception {
  if (clazz == null) {
    throw new NullPointerException("argument 'clazz' cannot be null");
  }
  List<String> fileExtensions=getFileExtensionsFromClass(clazz);
  for (int i=fileExtensions.size(); --i >= 0; ) {
    String ext=fileExtensions.get(i);
    if (langHandlerRegistry.get(ext) == null) {
      langHandlerRegistry.put(ext,clazz);
    }
 else {
      throw new Exception("cannot override language handler " + ext);
    }
  }
}

public void register ( Class < ? extends Lang > clazz ) throws Exception { if ( clazz == null ) { throw new NullPointerException ( "argument 'clazz' cannot be null" ) ; } List < String > fileExtensions = getFileExtensionsFromClass ( clazz ) ; for ( int i = fileExtensions . size ( ) ; -- i >= 0 ; ) { String ext = fileExtensions . get ( i ) ; if ( langHandlerRegistry . get ( ext ) == null ) { langHandlerRegistry . put ( ext , clazz ) ; } else { throw new Exception ( "cannot override language handler " + ext ) ; } } }
register language handler . the clazz will not be instantiated
