Java 类weka.core.scripting.Groovy 实例源码

项目:repo.kmeanspp.silhouette_score    文件:GroovyScript.java   
/**
    * Performs the actual run.
    */
   protected void doRun() {
     Object groovy;

     groovy = Groovy.newInstance(m_Owner.getFilename(), Object.class);
     if (hasMethod(groovy, "run"))
Groovy.invoke(groovy, "run", new Class[]{String[].class}, new Object[]{getArgs()});
     else if (hasMethod(groovy, "main"))
Groovy.invoke(groovy, "main", new Class[]{String[].class}, new Object[]{getArgs()});
     else
throw new IllegalStateException("Neither 'run' nor 'main' method found!");
   }
项目:autoweka    文件:GroovyScript.java   
/**
    * Performs the actual run.
    */
   protected void doRun() {
     Object groovy;

     groovy = Groovy.newInstance(m_Owner.getFilename(), Object.class);
     if (hasMethod(groovy, "run"))
Groovy.invoke(groovy, "run", new Class[]{String[].class}, new Object[]{getArgs()});
     else if (hasMethod(groovy, "main"))
Groovy.invoke(groovy, "main", new Class[]{String[].class}, new Object[]{getArgs()});
     else
throw new IllegalStateException("Neither 'run' nor 'main' method found!");
   }
项目:umple    文件:GroovyScript.java   
/**
    * Performs the actual run.
    */
   protected void doRun() {
     Object groovy;

     groovy = Groovy.newInstance(m_Owner.getFilename(), Object.class);
     if (hasMethod(groovy, "run"))
Groovy.invoke(groovy, "run", new Class[]{String[].class}, new Object[]{getArgs()});
     else if (hasMethod(groovy, "main"))
Groovy.invoke(groovy, "main", new Class[]{String[].class}, new Object[]{getArgs()});
     else
throw new IllegalStateException("Neither 'run' nor 'main' method found!");
   }
项目:repo.kmeanspp.silhouette_score    文件:GroovyScript.java   
/**
 * Performs pre-execution checks.
 * <p/>
 * This method checks whether Groovy is available (throws an exception if not).
 * 
 * @param args  optional commandline arguments
 * @throws Exception    if checks fail
 */
protected void preCheck(String[] args) throws Exception {
  super.preCheck(args);

  if (!Groovy.isPresent())
    throw new Exception("Groovy classes are not present in CLASSPATH!");
}
项目:autoweka    文件:GroovyScript.java   
/**
 * Performs pre-execution checks.
 * <p/>
 * This method checks whether Groovy is available (throws an exception if not).
 * 
 * @param args  optional commandline arguments
 * @throws Exception    if checks fail
 */
protected void preCheck(String[] args) throws Exception {
  super.preCheck(args);

  if (!Groovy.isPresent())
    throw new Exception("Groovy classes are not present in CLASSPATH!");
}
项目:umple    文件:GroovyScript.java   
/**
 * Performs pre-execution checks.
 * <p/>
 * This method checks whether Groovy is available (throws an exception if not).
 * 
 * @param args  optional commandline arguments
 * @throws Exception    if checks fail
 */
protected void preCheck(String[] args) throws Exception {
  super.preCheck(args);

  if (!Groovy.isPresent())
    throw new Exception("Groovy classes are not present in CLASSPATH!");
}
项目:repo.kmeanspp.silhouette_score    文件:GroovyScript.java   
/**
 * Returns whether scripts can be executed, i.e., Groovy is present.
 * 
 * @return      true if scripts can be executed
 */
protected boolean canExecuteScripts() {
  return Groovy.isPresent();
}
项目:autoweka    文件:GroovyScript.java   
/**
 * Returns whether scripts can be executed, i.e., Groovy is present.
 * 
 * @return      true if scripts can be executed
 */
protected boolean canExecuteScripts() {
  return Groovy.isPresent();
}
项目:umple    文件:GroovyScript.java   
/**
 * Returns whether scripts can be executed, i.e., Groovy is present.
 * 
 * @return      true if scripts can be executed
 */
protected boolean canExecuteScripts() {
  return Groovy.isPresent();
}