Revision: 3917
Author: janne.t.harkonen
Date: Wed Aug 25 09:37:51 2010
Log: Added some javadocs
http://code.google.com/p/robotframework/source/detail?r=3917
Modified:
/trunk/src/java/org/robotframework/JarRobot.java
/trunk/src/java/org/robotframework/RobotRunner.java
/trunk/src/java/org/robotframework/RunnerFactory.java
=======================================
--- /trunk/src/java/org/robotframework/JarRobot.java Tue Aug 24 03:42:46
2010
+++ /trunk/src/java/org/robotframework/JarRobot.java Wed Aug 25 09:37:51
2010
@@ -3,15 +3,29 @@
import org.robotframework.RunnerFactory;
import org.robotframework.RobotRunner;
+/**
+ *
+ * Entry point for using Robot Framework from Java programs.
+ *
+ */
+
public class JarRobot {
- public static void main(String[] args) {
+ public static void main(String[] args) {
int rc = run(args);
System.exit(rc);
}
- public static int run(String[] args) {
- RobotRunner runner = new RunnerFactory().createRunner();
+ /**
+ * Runs Robot Framework tests.
+ *
+ * @param args
+ * The command line options to Robot Framework, for example
+ * ['--outputdir', '/tmp', 'mytestdir']. At least one
datasource
+ * must be specified.
+ */
+ public static int run(String[] args) {
+ RobotRunner runner = new RunnerFactory().createRunner();
return runner.run(args);
- }
-}
+ }
+}
=======================================
--- /trunk/src/java/org/robotframework/RobotRunner.java Tue Aug 24 03:42:46
2010
+++ /trunk/src/java/org/robotframework/RobotRunner.java Wed Aug 25 09:37:51
2010
@@ -1,5 +1,9 @@
package org.robotframework;
+/**
+ * An interface class that is used for creating a Jython object capable of
+ * running Robot Framework.
+ */
public interface RobotRunner {
public int run(String[] args);
=======================================
--- /trunk/src/java/org/robotframework/RunnerFactory.java Tue Aug 24
23:23:41 2010
+++ /trunk/src/java/org/robotframework/RunnerFactory.java Wed Aug 25
09:37:51 2010
@@ -3,6 +3,12 @@
import org.python.core.PyObject;
import org.python.util.PythonInterpreter;
+/**
+ *
+ * Helper class to create an Jython object and coerce it so that it can be
used
+ * from Java.
+ *
+ */
public class RunnerFactory {
private PyObject runnerClass;
@@ -17,6 +23,10 @@
return interpreter.get("JarRunner");
}
+ /**
+ * Creates and returns an instance of the robot.JarRunner (implemented
in
+ * Python), which can be used to execute tests.
+ */
public RobotRunner createRunner() {
PyObject runnerObject = runnerClass.__call__();
return (RobotRunner) runnerObject.__tojava__(RobotRunner.class);