|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectEDU.purdue.jtb.misc.ClassInfo
public class ClassInfo
Class ClassInfo is used by the visitors to store information about a class including its name, a list of field types, and a list of field names. Class CommentPrinter appears at the end of this file.
Constructor Summary | |
---|---|
ClassInfo(Node node,
java.lang.String n)
|
Method Summary | |
---|---|
void |
addField(java.lang.String type,
java.lang.String name)
|
void |
addField(java.lang.String type,
java.lang.String name,
java.lang.String initialValue)
Use this method to generate a default constructor where this field value is already filled in, e.g. |
Node |
getAstNode()
|
java.lang.String |
getClassString(Spacing space)
Returns a string representing the class. |
java.lang.String |
getEbnfProduction(Spacing space)
Returns the EBNF production of the current class as a bunch of comments showing which field names belong to which parts of the production. |
java.lang.String |
getName()
|
java.util.Vector |
getNameList()
|
java.util.Vector |
getTypeList()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassInfo(Node node, java.lang.String n)
Method Detail |
---|
public Node getAstNode()
public java.lang.String getName()
public java.util.Vector getTypeList()
public java.util.Vector getNameList()
public void addField(java.lang.String type, java.lang.String name)
public void addField(java.lang.String type, java.lang.String name, java.lang.String initialValue)
MyProduction ::= Foo() "a constant token" public MyProduction(Foo f) { n.f0 = f; n.f1 = "a constant token"; }
public java.lang.String getEbnfProduction(Spacing space)
public java.lang.String getClassString(Spacing space)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |