|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.mjc.CParseClassContext
org.jmlspecs.checker.CParseClassContext
This class is used by the parser to collect the members of a class declaration. For efficiency (and to avoid memory leaks caused by poor garbage collection in the JVM) a factory method is used to generate instances and old instances are store on a stack for reuse. It has the same name as its superclass since ANTLR's textual grammar inheritance will then refer to the right (package-local) class.
| Field Summary | |
private ArrayList |
axioms
A ArrayList of JmlAxiom instance parsed in the
class declaration buffered by this. |
private ArrayList |
constraints
A ArrayList of JmlConstraint instance parsed in the
class declaration buffered by this. |
private ArrayList |
invariants
A ArrayList of JmlInvariant instance parsed in the
class declaration buffered by this. |
private ArrayList |
representsDecls
A ArrayList of JmlRepresentsDecl instance parsed in the
class declaration buffered by this. |
private static Stack |
stack
|
private ArrayList |
varAssertions
A ArrayList of JmlVarAssertion instance parsed in the
class declaration buffered by this. |
| Fields inherited from class org.multijava.mjc.CParseClassContext |
|
| Constructor Summary | |
protected |
CParseClassContext()
Hides the default constructor. |
| Method Summary | |
void |
addAxiom(JmlAxiom inv)
|
void |
addConstraint(JmlConstraint inv)
|
void |
addInvariant(JmlInvariant inv)
|
void |
addRepresentsDecl(JmlRepresentsDecl inv)
|
void |
addVarAssertion(JmlVarAssertion varAssert)
|
JmlAxiom[] |
axioms()
|
protected void |
clear()
Prepares this instance for recycling by clearing all the data stored in its ArrayLists. |
JmlConstraint[] |
constraints()
|
static CParseClassContext |
getInstance()
Factory method returns an instance of CParseJmlClassContext. |
JmlInvariant[] |
invariants()
|
void |
release()
Calls the static method release(this) |
static void |
release(CParseClassContext context)
Erases the data stored in context and pushes the
instance onto a stack for recycling. |
JmlRepresentsDecl[] |
representsDecls()
|
JmlVarAssertion[] |
varAssertions()
|
| Methods inherited from class org.multijava.mjc.CParseClassContext |
addBlockInitializer, addFieldDeclaration, addInnerDeclaration, addMethodDeclaration, getFieldsAndInits, getInnerClasses, getMethods, release |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private ArrayList invariants
JmlInvariant instance parsed in the
class declaration buffered by this.
private ArrayList constraints
JmlConstraint instance parsed in the
class declaration buffered by this.
private ArrayList representsDecls
JmlRepresentsDecl instance parsed in the
class declaration buffered by this.
private ArrayList axioms
JmlAxiom instance parsed in the
class declaration buffered by this.
private ArrayList varAssertions
JmlVarAssertion instance parsed in the
class declaration buffered by this.
private static Stack stack
| Constructor Detail |
protected CParseClassContext()
| Method Detail |
public static CParseClassContext getInstance()
public void release()
release(this)
release in class CParseClassContextpublic static void release(CParseClassContext context)
context and pushes the
instance onto a stack for recycling.
context - a used instance to be recycledprotected void clear()
clear in class CParseClassContextpublic void addInvariant(JmlInvariant inv)
public JmlInvariant[] invariants()
public void addConstraint(JmlConstraint inv)
public JmlConstraint[] constraints()
public void addRepresentsDecl(JmlRepresentsDecl inv)
public JmlRepresentsDecl[] representsDecls()
public void addAxiom(JmlAxiom inv)
public JmlAxiom[] axioms()
public void addVarAssertion(JmlVarAssertion varAssert)
public JmlVarAssertion[] varAssertions()
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||