|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectkawigi.problem.ClassDecl
public class ClassDecl
This class represents the code side of a problem statement. This means it has the class name, the information the method you are required to write, and a list of example tests. This serves many of the same purposes that TopCoder's ProblemComponent does, and most of the data from a ProblemComponent is converted into one of these objects for KawigiEdit's use. The reason I don't just use the ProblemComponent instead of having this class is so that I can have this class independent of TopCoder's classes and use it in stadalone mode. Then, assuming I can properly parse a problem statement (which I can't all the time, it's on the list), I can generate code the exact same way I would in plugin mode, and standalone won't suffer from having re-implemented code generation (it will just suffer from inadequate problem parsing).
| Constructor Summary | |
|---|---|
ClassDecl(java.lang.String className,
MethodDecl method)
Constructs a new ClassDecl with the given name and method. |
|
| Method Summary | |
|---|---|
void |
addTest(Test t)
Adds this test to the list of tests for this problem. |
int |
countTests()
Returns the current number of tests for this problem. |
java.lang.String |
evaluateTag(java.lang.String tag,
EditorLanguage language)
Evaluates a KawigiEdit tag from a template. |
MethodDecl |
getMethod()
Returns the method declaration that needs to be implemented in this class. |
java.lang.String |
getName()
Returns the name of this class. |
Test |
getTest(int index)
Returns the test case at the given index. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassDecl(java.lang.String className,
MethodDecl method)
| Method Detail |
|---|
public void addTest(Test t)
public java.lang.String getName()
public MethodDecl getMethod()
public int countTests()
public Test getTest(int index)
public java.lang.String evaluateTag(java.lang.String tag,
EditorLanguage language)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||