Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 used
        submission - the submission being evaluated
        submitterStage - 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 oracle
        oracle - a subclass of Oracle