public final class ClassSpec extends SpecificationBase
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
invariantKeyword |
Modifier and Type | Method and Description |
---|---|
void |
accept(ASTVisitor visitor)
Accept visitor for a visit.
|
void |
accept(ASTVisitorOld visitor)
Accept visitor for a visit.
|
void |
acceptChildren(ASTVisitor visitor)
Accept visitor for a visit to the children of this node.
|
static ClassSpec |
construct(java.lang.String text,
ErrorStream error,
SourcePosition pos)
Construct class specification from denoted text.
|
Formula |
getClassInvariant()
Get class invariant.
|
void |
setClassInvariant(Formula inv)
Set class invariant.
|
getPosition, getText, setPosition
accept, accept, print, printCore, toString, toStringCore
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPosition, setPosition
print, printCore, toString, toStringCore
public static final java.lang.String invariantKeyword
public static ClassSpec construct(java.lang.String text, ErrorStream error, SourcePosition pos)
text
- the text of the specification.error
- the stream for printing error messagespos
- the source position of the specificationpublic Formula getClassInvariant()
public void setClassInvariant(Formula inv)
inv
- the class invariant (may be null).public void accept(ASTVisitorOld visitor)
accept
in interface AST
accept
in class SpecificationBase
visitor
- the visitor who is accepted by this node.public void accept(ASTVisitor visitor)
accept
in interface AST
accept
in class SpecificationBase
visitor
- the visitor who is accepted by this node.public void acceptChildren(ASTVisitor visitor)
acceptChildren
in interface AST
acceptChildren
in class ASTBase
visitor
- the visitor who is accepted by the children of this node.