m_CustomMethods.register(this, weka.core.converters.ArffLoader.class, "Loader"); m_CustomMethods.register(this, weka.core.converters.ArffSaver.class, "Saver"); m_CustomMethods.register(this, weka.core.converters.C45Loader.class, "Loader"); m_CustomMethods.register(this, weka.core.converters.C45Saver.class, "Saver"); m_CustomMethods.register(this, weka.core.converters.CSVLoader.class, "Loader"); m_CustomMethods.register(this, weka.core.converters.CSVSaver.class, "Saver"); m_CustomMethods.register(this, weka.core.converters.SerializedInstancesLoader.class, "Loader"); m_CustomMethods.register(this, weka.core.converters.SerializedInstancesSaver.class, "Saver");
classnames = ConverterUtils.getFileLoaders(); for (i = 0; i < classnames.size(); i++) m_CustomMethods.register(this, Class.forName(classnames.get(i)), "Loader"); classnames = ConverterUtils.getFileSavers(); for (i = 0; i < classnames.size(); i++) m_CustomMethods.register(this, Class.forName(classnames.get(i)), "Saver");
  public void clear() throws Exception {    super.clear();        // ignore: suppress unnecessary GUI stuff     // needs to be checked for new Java versions (might introduce new properties)     // - works with Java 1.5    m_Properties.addIgnored("UI");    m_Properties.addIgnored("actionMap");    m_Properties.addIgnored("alignmentX");    m_Properties.addIgnored("alignmentY");    m_Properties.addIgnored("autoscrolls");    m_Properties.addIgnored("background");    m_Properties.addIgnored("border");    m_Properties.addIgnored("componentPopupMenu");    m_Properties.addIgnored("debugGraphicsOptions");    m_Properties.addIgnored("doubleBuffered");    m_Properties.addIgnored("enabled");    m_Properties.addIgnored("focusCycleRoot");    m_Properties.addIgnored("focusTraversalPolicy");    m_Properties.addIgnored("focusTraversalPolicyProvider");    m_Properties.addIgnored("focusable");    m_Properties.addIgnored("font");    m_Properties.addIgnored("foreground");    m_Properties.addIgnored("inheritsPopupMenu");    m_Properties.addIgnored("inputVerifier");    m_Properties.addIgnored("layout");    m_Properties.addIgnored("locale");    m_Properties.addIgnored("maximumSize");    m_Properties.addIgnored("minimumSize");    m_Properties.addIgnored("nextFocusableComponent");    m_Properties.addIgnored("opaque");    m_Properties.addIgnored("preferredSize");    m_Properties.addIgnored("requestFocusEnabled");    m_Properties.addIgnored("toolTipText");    m_Properties.addIgnored("transferHandler");    m_Properties.addIgnored("verifyInputWhenFocusTarget");    m_Properties.addIgnored("visible");    // special ignore    m_Properties.addIgnored("size");  // otherwise you get an endless loop with Dimension!    m_Properties.addIgnored("location");  // otherwise you get an endless loop with Point!    // allow    m_Properties.addAllowed(weka.gui.beans.BeanInstance.class, "x");    m_Properties.addAllowed(weka.gui.beans.BeanInstance.class, "y");    m_Properties.addAllowed(weka.gui.beans.BeanInstance.class, "bean");    m_Properties.addAllowed(weka.gui.beans.Saver.class, "saver");    m_Properties.addAllowed(weka.gui.beans.Loader.class, "loader");    if (getDataType() == DATATYPE_LAYOUT)      m_Properties.addAllowed(weka.gui.beans.Loader.class, "beanContext");    else      m_Properties.addIgnored(weka.gui.beans.Loader.class, "beanContext");   // TODO: more classes???    m_Properties.addAllowed(weka.gui.beans.Filter.class, "filter");    m_Properties.addAllowed(weka.gui.beans.Classifier.class, "wrappedAlgorithm");    m_Properties.addAllowed(weka.gui.beans.Clusterer.class, "wrappedAlgorithm");    m_Properties.addAllowed(weka.classifiers.Classifier.class, "debug");    m_Properties.addAllowed(weka.classifiers.Classifier.class, "options");        m_Properties.addAllowed(weka.filters.Filter.class, "options");        m_Properties.addAllowed(weka.core.converters.DatabaseSaver.class, "options");    m_Properties.addAllowed(weka.core.converters.DatabaseLoader.class, "options");    // we assume that classes implementing SplitEvaluator also implement OptionHandler    m_Properties.addAllowed(weka.experiment.SplitEvaluator.class, "options");    // we assume that classes implementing ResultProducer also implement OptionHandler    m_Properties.addAllowed(weka.experiment.ResultProducer.class, "options");    // read/write methods    m_CustomMethods.register(this, Color.class, "Color");    m_CustomMethods.register(this, Dimension.class, "Dimension");    m_CustomMethods.register(this, Font.class, "Font");    m_CustomMethods.register(this, Point.class, "Point");    m_CustomMethods.register(this, ColorUIResource.class, "ColorUIResource");    m_CustomMethods.register(this, FontUIResource.class, "FontUIResource");    m_CustomMethods.register(this, weka.gui.beans.BeanInstance.class, "BeanInstance");    m_CustomMethods.register(this, weka.gui.beans.BeanConnection.class, "BeanConnection");    m_CustomMethods.register(this, weka.gui.beans.BeanVisual.class, "BeanVisual");    m_CustomMethods.register(this, weka.gui.beans.Saver.class, "BeanSaver");    m_CustomMethods.register(this, weka.gui.beans.MetaBean.class, "MetaBean");        m_CustomMethods.register(this, weka.core.converters.ArffLoader.class, "Loader");    m_CustomMethods.register(this, weka.core.converters.ArffSaver.class, "Saver");    m_CustomMethods.register(this, weka.core.converters.C45Loader.class, "Loader");    m_CustomMethods.register(this, weka.core.converters.C45Saver.class, "Saver");    m_CustomMethods.register(this, weka.core.converters.CSVLoader.class, "Loader");    m_CustomMethods.register(this, weka.core.converters.CSVSaver.class, "Saver");    m_CustomMethods.register(this, weka.core.converters.SerializedInstancesLoader.class, "Loader");    m_CustomMethods.register(this, weka.core.converters.SerializedInstancesSaver.class, "Saver");        // other variables    m_BeanInstances          = null;    m_BeanInstancesID        = null;    m_CurrentMetaBean        = null;    m_IgnoreBeanConnections  = true;    m_BeanConnectionRelation = null;  }