public static TheHashinator
        constructHashinator(
                Class<? extends TheHashinator> hashinatorImplementation,
                byte configBytes[], boolean cooked) {
        try {
            Constructor<? extends TheHashinator> constructor =
                    hashinatorImplementation.getConstructor(byte[].class, boolean.class);
            return constructor.newInstance(configBytes, cooked);
        } catch (Exception e) {
            Throwables.propagate(e);
        }
        return null;
    }
public static TheHashinator constructHashinator ( Class < ? extends TheHashinator > hashinatorImplementation , byte configBytes [ ] , boolean cooked ) { try { Constructor < ? extends TheHashinator > constructor = hashinatorImplementation . getConstructor ( byte [ ] . class , boolean . class ) ; return constructor . newInstance ( configBytes , cooked ) ; } catch ( Exception e ) { Throwables . propagate ( e ) ; } return null ; }
Helper method to do the reflection boilerplate to call the constructor
of the selected hashinator and convert the exceptions to runtime exceptions.
@param hashinatorImplementation  hashinator class
@param configBytes  config data (raw or cooked)
@param cooked  true if configBytes is cooked, i.e. in wire serialization format
@return  the constructed hashinator