ce.setClassType(weka.experiment.ResultListener.class); Object initial = new weka.experiment.CSVResultListener();
ce.setClassType(weka.classifiers.Classifier.class); Object initial = new weka.classifiers.ZeroR();
  public static void main(String [] args) {    try {      System.err.println("---Registering Weka Editors---");      java.beans.PropertyEditorManager	.registerEditor(weka.experiment.ResultProducer.class,			GenericObjectEditor.class);      java.beans.PropertyEditorManager	.registerEditor(weka.experiment.SplitEvaluator.class,			GenericObjectEditor.class);      java.beans.PropertyEditorManager	.registerEditor(weka.classifiers.Classifier.class,			GenericObjectEditor.class);      java.beans.PropertyEditorManager	.registerEditor(SelectedTag.class,			SelectedTagEditor.class);      java.beans.PropertyEditorManager	.registerEditor(java.io.File.class,			FileEditor.class);      GenericObjectEditor ce = new GenericObjectEditor();      ce.setClassType(weka.experiment.ResultListener.class);      Object initial = new weka.experiment.CSVResultListener();      if (args.length > 0) {	initial = (Object)Class.forName(args[0]).newInstance();      }      ce.setValue(initial);      PropertyDialog pd = new PropertyDialog(ce, 100, 100);      pd.addWindowListener(new WindowAdapter() {	public void windowClosing(WindowEvent e) {	  PropertyEditor pe = ((PropertyDialog)e.getSource()).getEditor();	  Object c = (Object)pe.getValue();	  String options = "";	  if (c instanceof OptionHandler) {	    options = Utils.joinOptions(((OptionHandler)c).getOptions());	  }	  System.out.println(c.getClass().getName() + " " + options);	  System.exit(0);	}      });    } catch (Exception ex) {      ex.printStackTrace();      System.err.println(ex.getMessage());    }  }