tds/src/main/java/thredds/core/DatasetManager.java
public void registerDatasetSource(String className) {
    Class vClass;
    try {
      vClass = DatasetManager.class.getClassLoader().loadClass(className);
    } catch (ClassNotFoundException e) {
      log.error("Attempt to load DatasetSource class " + className + " not found");
      return;
    }

    if (!(DatasetSource.class.isAssignableFrom(vClass))) {
      log.error("Attempt to load class " + className + " does not implement " + DatasetSource.class.getName());
      return;
    }

    // create instance of the class
    Object instance;
    try {
      instance = vClass.newInstance();
    } catch (InstantiationException e) {
      log.error("Attempt to load Viewer class " + className + " cannot instantiate, probably need default Constructor.");
      return;
    } catch (IllegalAccessException e) {
      log.error("Attempt to load Viewer class " + className + " is not accessible.");
      return;
    }

    registerDatasetSource((DatasetSource) instance);
  }
public void registerDatasetSource(String className) {
    Class vClass;
    try {
      vClass = DatasetManager.class.getClassLoader().loadClass(className);
    } catch (ClassNotFoundException e) {
      log.error("Attempt to load DatasetSource class " + className + " not found");
      return;
    }

    if (!(DatasetSource.class.isAssignableFrom(vClass))) {
      log.error("Attempt to load class " + className + " does not implement " + DatasetSource.class.getName());
      return;
    }

    // create instance of the class
    Object instance;
    try {
      instance = vClass.newInstance();
    } catch (InstantiationException e) {
      log.error("Attempt to load Viewer class " + className + " cannot instantiate, probably need default Constructor.");
      return;
    } catch (IllegalAccessException e) {
      log.error("Attempt to load Viewer class " + className + " is not accessible.");
      return;
    }

    registerDatasetSource((DatasetSource) instance);
  }
public void registerDatasetSource ( String className ) { Class vClass ; try { vClass = DatasetManager . class . getClassLoader ( ) . loadClass ( className ) ; } catch ( ClassNotFoundException e ) { log . error ( "Attempt to load DatasetSource class " + className + " not found" ) ; return ; } if ( ! ( DatasetSource . class . isAssignableFrom ( vClass ) ) ) { log . error ( "Attempt to load class " + className + " does not implement " + DatasetSource . class . getName ( ) ) ; return ; } // create instance of the class Object instance ; try { instance = vClass . newInstance ( ) ; } catch ( InstantiationException e ) { log . error ( "Attempt to load Viewer class " + className + " cannot instantiate, probably need default Constructor." ) ; return ; } catch ( IllegalAccessException e ) { log . error ( "Attempt to load Viewer class " + className + " is not accessible." ) ; return ; } registerDatasetSource ( ( DatasetSource ) instance ) ; }
DatasetSource
DatasetSource