public final class UnitSpec extends SpecificationBase
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 UnitSpec |
construct(java.lang.String text,
ErrorStream error,
SourcePosition pos)
Construct unit specification from denoted text.
|
Declaration[] |
getDeclarations()
Get declarations introduced in unit.
|
Import[] |
getImports()
Get imports used by unit.
|
Name[] |
getTheories()
Get theories referenced by unit.
|
void |
setDeclarations(java.util.Vector<Declaration> ds)
Set declarations introduced by unit.
|
void |
setImports(java.util.Vector<Import> ts)
Set imports used by unit.
|
void |
setTheories(java.util.Vector<Name> ts)
Set theories referenced by unit.
|
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 UnitSpec 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 Import[] getImports()
public void setImports(java.util.Vector<Import> ts)
ts
- imports (may be null)public Name[] getTheories()
public void setTheories(java.util.Vector<Name> ts)
ts
- list of theories (may be null)public Declaration[] getDeclarations()
public void setDeclarations(java.util.Vector<Declaration> ds)
ds
- list of declarations (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.