Class OracleFactory
- java.lang.Object
-
- edu.odu.cs.zeil.codegrader.oracle.OracleFactory
-
public final class OracleFactory extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Oracle
getOracle(OracleProperties option, TestCase testCase, Submission submission, Stage submitterStage)
Create an instance of an oracle.static void
register(java.lang.String name, java.lang.Class<? extends Oracle> oracle)
Register an oracle for use in scoring test case executions.
-
-
-
Method Detail
-
getOracle
public static Oracle getOracle(OracleProperties option, TestCase testCase, Submission submission, Stage submitterStage)
Create an instance of an oracle.- Parameters:
option
- describes a grading option, including the desired oracle and the test point cap.testCase
- the test case for which this oracle will be usedsubmission
- the submission being evaluatedsubmitterStage
- the stage where submitted code was built.- Returns:
- an oracle instance, or null if not oracle can be created.
-
register
public static void register(java.lang.String name, java.lang.Class<? extends Oracle> oracle)
Register an oracle for use in scoring test case executions.- Parameters:
name
- short name for an oracleoracle
- a subclass of Oracle
-
-