class ValueMetaFactory {

  public static ValueMetaInterface createValueMeta( String name, int type, int length, int precision ) throws KettlePluginException {
    PluginInterface stringPlugin = pluginRegistry.getPlugin( ValueMetaPluginType.class, String.valueOf( type ) );
    if ( stringPlugin == null ) {
      throw new KettlePluginException( "Unable to locate value meta plugin of type (id) " + type );
    }
    ValueMetaInterface valueMeta = pluginRegistry.loadClass( stringPlugin, ValueMetaInterface.class );
    valueMeta.setName( name );
    valueMeta.setLength( length, precision );
    return valueMeta;
  }

}