Package com.spertus.jacquard.common
Class Autograder.Builder
java.lang.Object
com.spertus.jacquard.common.Autograder.Builder
- Enclosing class:
- Autograder
A singleton class for building the Autograder.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default Java language level.static final longThe default timeout for aGrader, in milliseconds.static final VisibilityThe default visibility of test results. -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild()Builds the Autograder using information from this builder.static Autograder.BuilderGets the singleton instance of Builder.javaLevel(int javaLevel) Sets the Java language level.timeout(long timeout) Sets the timeout forGraderexecution (or 0 for no timeout).visibility(Visibility visibility) Sets the visibility ofGraderresults.
-
Field Details
-
DEFAULT_TIMEOUT_MS
public static final long DEFAULT_TIMEOUT_MSThe default timeout for aGrader, in milliseconds.- See Also:
-
DEFAULT_JAVA_LEVEL
public static final int DEFAULT_JAVA_LEVELThe default Java language level.- See Also:
-
DEFAULT_VISIBILITY
The default visibility of test results.
-
-
Method Details
-
getInstance
Gets the singleton instance of Builder.- Returns:
- the instance
-
timeout
Sets the timeout forGraderexecution (or 0 for no timeout). If this method is not called,DEFAULT_TIMEOUT_MSis used.- Parameters:
timeout- the timeout in milliseconds or 0 for no timeout- Returns:
- the builder
- Throws:
ClientException- if this builder has already been built
-
javaLevel
Sets the Java language level. If this method is not called,DEFAULT_JAVA_LEVELis used.- Parameters:
javaLevel- the Java language level- Returns:
- the builder
- Throws:
ClientException- if this builder has already been built
-
visibility
Sets the visibility ofGraderresults. If this method is no called,DEFAULT_VISIBILITYis used.- Parameters:
visibility- the visibility- Returns:
- the builder
- Throws:
ClientException- if this builder has already been built
-
build
public void build()Builds the Autograder using information from this builder. This may be called only once per program execution (unlessVisibleForTestingmethods are used).- Throws:
ClientException- if this builder has already been built
-