Skip to content

Commit 3c52af0

Browse files
committed
Added some javadocs
1 parent 808d6db commit 3c52af0

3 files changed

Lines changed: 32 additions & 4 deletions

File tree

‎src/java/org/robotframework/JarRobot.java‎

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,29 @@
33
import org.robotframework.RunnerFactory;
44
import org.robotframework.RobotRunner;
55

6+
/**
7+
*
8+
* Entry point for using Robot Framework from Java programs.
9+
*
10+
*/
11+
612
public class JarRobot {
713

8-
public static void main(String[] args) {
14+
public static void main(String[] args) {
915
int rc = run(args);
1016
System.exit(rc);
1117
}
1218

13-
public static int run(String[] args) {
14-
RobotRunner runner = new RunnerFactory().createRunner();
19+
/**
20+
* Runs Robot Framework tests.
21+
*
22+
* @param args
23+
* The command line options to Robot Framework, for example
24+
* ['--outputdir', '/tmp', 'mytestdir']. At least one datasource
25+
* must be specified.
26+
*/
27+
public static int run(String[] args) {
28+
RobotRunner runner = new RunnerFactory().createRunner();
1529
return runner.run(args);
16-
}
30+
}
1731
}

‎src/java/org/robotframework/RobotRunner.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package org.robotframework;
22

3+
/**
4+
* An interface class that is used for creating a Jython object capable of
5+
* running Robot Framework.
6+
*/
37
public interface RobotRunner {
48

59
public int run(String[] args);

‎src/java/org/robotframework/RunnerFactory.java‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
import org.python.core.PyObject;
44
import org.python.util.PythonInterpreter;
55

6+
/**
7+
*
8+
* Helper class to create an Jython object and coerce it so that it can be used
9+
* from Java.
10+
*
11+
*/
612
public class RunnerFactory {
713

814
private PyObject runnerClass;
@@ -17,6 +23,10 @@ private PyObject importRunnerClass() {
1723
return interpreter.get("JarRunner");
1824
}
1925

26+
/**
27+
* Creates and returns an instance of the robot.JarRunner (implemented in
28+
* Python), which can be used to execute tests.
29+
*/
2030
public RobotRunner createRunner() {
2131
PyObject runnerObject = runnerClass.__call__();
2232
return (RobotRunner) runnerObject.__tojava__(RobotRunner.class);

0 commit comments

Comments
 (0)