|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcdx.scorebot.scoring.logic.GenericMethod
cdx.scorebot.scoring.logic.VoidMethod
public class VoidMethod
evaluates an void method call (this is called a "procedure")
Constructor Summary | |
---|---|
VoidMethod(Identifier methodName,
Arguments args)
instantiate an void method call |
Method Summary | |
---|---|
void |
executeLogic(Context context)
execute the method called in the specified context |
static java.lang.String[] |
getVoidMethods()
gets an array with all void method names |
void |
validateTypes(java.util.HashMap<java.lang.String,LiteralType> varTypes,
java.util.HashMap<java.lang.String,TestData> testsInfo)
Attempts to validate the type-correctness of all constituent LogicCodeEvaluatable logic code. |
Methods inherited from class cdx.scorebot.scoring.logic.GenericMethod |
---|
getArgs, getMethodName, throwIAE |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VoidMethod(Identifier methodName, Arguments args)
methodName
- the name of the methodargs
- the args passed to the method, if anyMethod Detail |
---|
public void executeLogic(Context context) throws LogicException
executeLogic
in interface LogicCodeExecutable
context
- contains the current context of the logic processor
UndefinedMethodException
- thrown if the specified method name does not reference a method which exists
IllegalMethodArgsException
- thrown if the specified method name exists but the args don't meet expectations
LogicException
- thrown if an exception occurs while processing the logicpublic void validateTypes(java.util.HashMap<java.lang.String,LiteralType> varTypes, java.util.HashMap<java.lang.String,TestData> testsInfo) throws LogicException
LogicCodeExecutable
validateTypes
in interface LogicCodeExecutable
varTypes
- contains the type of value stored by each variable (variables names are keys)testsInfo
- information about each test item keyed on test item names this logic may hold
LogicException
- thrown if an exception if an invalid test, test result, or test option is foundpublic static java.lang.String[] getVoidMethods()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |