public interface ChannelDecl extends Decl
A channel declaration is a Z declaration that accepts generic types. It represents the SimpleCDeclaration grammar rule.
Channels can be declared either as typed or synchronisation. They can als have generic types or come from a previously declared schema.
The structure of the complex type associated with this class is a follows:
./parser/tests/cirus/channels.tex for an example).
The getNameList() method contains a list of non-null NameList
objects with size two. The first element is the (possibly empty) list of generic formal
parameters, whereas the second element is the (possibly empty) list of declared channel names.
If the second list is empty, that means the ChannelDecl represents a channelfrom
(i.e., channel declaration from a schema expression found in the getExpr() method).
| Modifier and Type | Field and Description |
|---|---|
static int |
CHANNEL_GENFORMAL_INDEX |
static int |
CHANNEL_NAMELIST_INDEX |
| Modifier and Type | Method and Description |
|---|---|
Expr |
getExpr()
Returns the Expr element.
|
ListTerm<NameList> |
getNameList()
Returns the NameList elements.
|
ZNameList |
getZChannelNameList()
This is a convenience method.
|
ZNameList |
getZGenFormals()
This is a convenience method.
|
void |
setExpr(Expr expr)
Sets the Expr element.
|
static final int CHANNEL_GENFORMAL_INDEX
static final int CHANNEL_NAMELIST_INDEX
ListTerm<NameList> getNameList()
Returns the NameList elements.
To add or remove elements, use the methods provided by the List interface (that's why there is no need for a setter method).
Expr getExpr()
void setExpr(Expr expr)
expr - the Expr element.getExpr()ZNameList getZGenFormals()
ZNameList getZChannelNameList()
Copyright © 2003–2016 Community Z Tools Project. All rights reserved.