cdm/src/main/java/ucar/nc2/dataset/CoordTransBuilder.java
static public void registerTransform( String transformName, Class c) {
    if (!(VertTransformBuilderIF.class.isAssignableFrom( c)) && !(HorizTransformBuilderIF.class.isAssignableFrom( c)))
      throw new IllegalArgumentException("Class "+c.getName()+" must implement VertTransformBuilderIF or HorizTransformBuilderIF");

    // fail fast - check newInstance works
    try {
      c.newInstance();
    } catch (InstantiationException e) {
      throw new IllegalArgumentException("CoordTransBuilderIF Class "+c.getName()+" cannot instantiate, probably need default Constructor");
    } catch (IllegalAccessException e) {
      throw new IllegalArgumentException("CoordTransBuilderIF Class "+c.getName()+" is not accessible");
    }

    // user stuff gets put at top
    if (userMode)
      transformList.add( 0, new Transform( transformName, c));
    else
      transformList.add( new Transform( transformName, c));

  }
static public void registerTransform( String transformName, Class c) {
    if (!(VertTransformBuilderIF.class.isAssignableFrom( c)) && !(HorizTransformBuilderIF.class.isAssignableFrom( c)))
      throw new IllegalArgumentException("Class "+c.getName()+" must implement VertTransformBuilderIF or HorizTransformBuilderIF");

    // fail fast - check newInstance works
    try {
      c.newInstance();
    } catch (InstantiationException e) {
      throw new IllegalArgumentException("CoordTransBuilderIF Class "+c.getName()+" cannot instantiate, probably need default Constructor");
    } catch (IllegalAccessException e) {
      throw new IllegalArgumentException("CoordTransBuilderIF Class "+c.getName()+" is not accessible");
    }

    // user stuff gets put at top
    if (userMode)
      transformList.add( 0, new Transform( transformName, c));
    else
      transformList.add( new Transform( transformName, c));

  }
static public void registerTransform ( String transformName , Class c ) { if ( ! ( VertTransformBuilderIF . class . isAssignableFrom ( c ) ) && ! ( HorizTransformBuilderIF . class . isAssignableFrom ( c ) ) ) throw new IllegalArgumentException ( "Class " + c . getName ( ) + " must implement VertTransformBuilderIF or HorizTransformBuilderIF" ) ; // fail fast - check newInstance works
 try { c . newInstance ( ) ; } catch ( InstantiationException e ) { throw new IllegalArgumentException ( "CoordTransBuilderIF Class " + c . getName ( ) + " cannot instantiate, probably need default Constructor" ) ; } catch ( IllegalAccessException e ) { throw new IllegalArgumentException ( "CoordTransBuilderIF Class " + c . getName ( ) + " is not accessible" ) ; } // user stuff gets put at top
 if ( userMode ) transformList . add ( 0 , new Transform ( transformName , c ) ) ; else transformList . add ( new Transform ( transformName , c ) ) ; }
Register a class that implements a Coordinate Transform.
@param transformName name of transform. This name is used in the datasets to identify the transform, eg CF names.
@param c class that implements CoordTransBuilderIF.
Register a class that implements a Coordinate Transform .