/** * gets whether the dynamic approach should be used or not * * @return true if the dynamic approach is to be used */ public boolean useDynamic() { if (getInputProperties() == null) { loadInputProperties(); } // check our classloader against the system one - if different then // return false (as dynamic classloading only works for classes discoverable // in the system classpath /* * if * (!ClassLoader.getSystemClassLoader().equals(this.getClass().getClassLoader * ())) { if * (Boolean.parseBoolean(getInputProperties().getProperty(USE_DYNAMIC, * "true")) == true) { System.out.println( * "[GenericPropertiesCreator] classloader in use is not the system " + * "classloader: using static entries in weka/gui/GenericObjectEditor.props rather " * + "than dynamic class discovery."); } return false; } */ return Boolean.parseBoolean(getInputProperties().getProperty(USE_DYNAMIC, "true")); }
/** * gets whether the dynamic approach should be used or not * * @return true if the dynamic approach is to be used */ public boolean useDynamic() { if (getInputProperties() == null) { loadInputProperties(); } // check our classloader against the system one - if different then // return false (as dynamic classloading only works for classes discoverable // in the system classpath /* * if * (!ClassLoader.getSystemClassLoader().equals(this.getClass().getClassLoader * ())) { if * (Boolean.parseBoolean(getInputProperties().getProperty(USE_DYNAMIC, * "true")) == true) { System.out.println( * "[GenericPropertiesCreator] classloader in use is not the system " + * "classloader: using static entries in weka/gui/GenericObjectEditor.props rather " * + "than dynamic class discovery."); } return false; } */ return Boolean.parseBoolean(getInputProperties().getProperty(USE_DYNAMIC, "true")); }
/** * generates the props-file for the GenericObjectEditor and stores it only if * the the param <code>store</code> is TRUE. If it is FALSE then the generated * properties file can be retrieved via the <code>getOutputProperties</code> * method. * * @param store if TRUE then the properties file is stored to the stored * filename * @param loadInputProps true if the input properties should be loaded * @throws Exception if something goes wrong * @see #getOutputFilename() * @see #setOutputFilename(String) * @see #getOutputProperties() */ public void execute(boolean store, boolean loadInputProps) throws Exception { // read properties file if (loadInputProps) { loadInputProperties(); } // generate the props file generateOutputProperties(); // write properties file if (store) { storeOutputProperties(); } }
/** * generates the props-file for the GenericObjectEditor and stores it only if * the the param <code>store</code> is TRUE. If it is FALSE then the generated * properties file can be retrieved via the <code>getOutputProperties</code> * method. * * @param store if TRUE then the properties file is stored to the stored * filename * @param loadInputProps true if the input properties should be loaded * @throws Exception if something goes wrong * @see #getOutputFilename() * @see #setOutputFilename(String) * @see #getOutputProperties() */ public void execute(boolean store, boolean loadInputProps) throws Exception { // read properties file if (loadInputProps) { loadInputProperties(); } // generate the props file generateOutputProperties(); // write properties file if (store) { storeOutputProperties(); } }