org.scala_tools.maven.executions
Class ReflectionJavaMainCaller

java.lang.Object
  extended by org.scala_tools.maven.executions.AbstractJavaMainCaller
      extended by org.scala_tools.maven.executions.ReflectionJavaMainCaller
All Implemented Interfaces:
JavaMainCaller

public class ReflectionJavaMainCaller
extends AbstractJavaMainCaller

This class will call a java main method via reflection.

Author:
J. Suereth Note: a -classpath argument *must* be passed into the jvmargs.

Field Summary
 
Fields inherited from class org.scala_tools.maven.executions.AbstractJavaMainCaller
args, env, jvmArgs, logOnly, mainClassName, requester
 
Constructor Summary
ReflectionJavaMainCaller(org.apache.maven.plugin.AbstractMojo requester, String mainClassName, String classpath, String[] jvmArgs, String[] args)
           
 
Method Summary
 void addJvmArgs(String... args)
          Adds a JVM arg.
 void run(boolean displayCmd, boolean throwFailure)
          Runs the JavaMain with all the built up arguments/options
 void spawn(boolean displayCmd)
          spawns a thread to run the method
 
Methods inherited from class org.scala_tools.maven.executions.AbstractJavaMainCaller
addArgs, addEnvVar, addOption, addOption, addOption, addToClasspath, getLogOnly, run, setLogOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectionJavaMainCaller

public ReflectionJavaMainCaller(org.apache.maven.plugin.AbstractMojo requester,
                                String mainClassName,
                                String classpath,
                                String[] jvmArgs,
                                String[] args)
                         throws Exception
Throws:
Exception
Method Detail

addJvmArgs

public void addJvmArgs(String... args)
Description copied from interface: JavaMainCaller
Adds a JVM arg. Note: This is not available for in-process "forks"

Specified by:
addJvmArgs in interface JavaMainCaller
Overrides:
addJvmArgs in class AbstractJavaMainCaller

run

public void run(boolean displayCmd,
                boolean throwFailure)
         throws Exception
Description copied from interface: JavaMainCaller
Runs the JavaMain with all the built up arguments/options

Throws:
Exception

spawn

public void spawn(boolean displayCmd)
           throws Exception
spawns a thread to run the method

Throws:
Exception


Copyright © 2009-2010 Scala Tools. All Rights Reserved.