public class ProcessSignatureImpl extends CircusSignatureImpl implements ProcessSignature
ProcessSignature.ACTION_SIGNATURES_INDEX, FORMAL_PARAMS_INDEX, LOCALZ_SIGNATURES_INDEX, MAIN_SIGNATURES_INDEX, PROCESS_SIGNATURES_INDEX, STATE_SIGNATURE_INDEX| Modifier | Constructor and Description |
|---|---|
protected |
ProcessSignatureImpl()
The default constructor.
|
protected |
ProcessSignatureImpl(BaseFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
<R> R |
accept(Visitor<R> v)
Accepts a visitor.
|
protected <K,V> void |
addToMapAndCheckConsistency(Map<K,V> map,
K key,
V value)
Add the given key/value pair to the given map, raising an error in case of duplicates.
|
static boolean |
countingFinaliser()
public attribute determining whether to log to the
standard output information about who is creating
this instance of ProcessSignatureImpl (e.g., ic >= sl)
|
ProcessSignatureImpl |
create(Object[] args)
Returns a new object of this class.
|
boolean |
equals(Object obj)
Compares the specified object with this ProcessSignatureImpl
for equality.
|
protected ZName |
fullQualifiedName(ZName procName,
ZName actionName)
For a process P and action A, their fully qualified name is "P_LxCy.A",
where x and y are the line and column numbers from LocAnn associated with P.
|
Map<ZName,ActionSignatureList> |
getActions()
This is a convenience method.
|
ActionSignatureList |
getActionSignatures()
This is a convenience method.
|
ZSignatureList |
getBasicProcessLocalZSignatures()
This is a convenience method.
|
CallUsage |
getCallUsage()
Returns the CallUsage element.
|
Object[] |
getChildren() |
CircusChannelSetList |
getCircusProcessChannelSets()
This is a convenience method.
|
Signature |
getFormalParamsOrIndexes()
This is a convenience method.
|
ZNameList |
getGenFormals()
Returns the GenFormals element.
|
Map<ZName,ZSignatureList> |
getLocalZSignatures()
This is a convenience method.
|
ZSignatureList |
getMainSignatures()
This is a convenience method.
|
ChannelSetList |
getProcessChannelSets()
Returns the ProcessChannelSets element.
|
Name |
getProcessName()
This is a convenience method for getName.
|
ProcessSignatureList |
getProcessSignatures()
This is a convenience method.
|
ZName |
getProcessZName()
This is a convenience method.
|
ListTerm<SignatureList> |
getSignatureList()
Returns the SignatureList elements.
|
Signature |
getStateSignature()
This is a convenience method.
|
StateUpdate |
getStateUpdate()
Returns the StateUpdate element.
|
Map<ZName,Signature> |
getUsedChannels()
This is a convenience method.
|
List<NameTypePair> |
getUsedChannelsAsList() |
Map<ZName,CircusChannelSetList> |
getUsedChannelSets()
This is a convenience method.
|
List<ChannelSet> |
getUsedChannelSetsAsList() |
Map<ZName,CircusCommunicationList> |
getUsedCommunications()
This is a convenience method.
|
List<Communication> |
getUsedCommunicationsAsList() |
Map<ZName,CircusNameSetList> |
getUsedNameSets()
This is a convenience method.
|
List<NameSet> |
getUsedNameSetsAsList() |
int |
hashCode()
Returns the hash code value for this ProcessSignatureImpl.
|
static long |
instanceCount()
Only concrete classes get the instance count method visible
|
static long |
instancesFinalised() |
boolean |
isBasicProcessSignature()
Returns true whether or not this signature is for a basic process or not.
|
boolean |
isEmptyProcessSignature()
Returns true whether or not this signature is empty.
|
void |
setCallUsage(CallUsage callUsage)
Sets the CallUsage element.
|
Signature |
setFormalParamsOrIndexes(Signature sig)
This is a convenience method.
|
void |
setGenFormals(ZNameList genFormals)
Sets the GenFormals element.
|
void |
setProcessChannelSets(ChannelSetList processChannelSets)
Sets the ProcessChannelSets element.
|
void |
setProcessName(Name name)
This is a convenience method for setName(name).
|
Signature |
setStateSignature(Signature sig)
This is a convenience method.
|
void |
setStateUpdate(StateUpdate stateUpdate)
Sets the StateUpdate element.
|
getName, getZName, setNameannsSize, getAnn, getAnns, getFactory, hasAnn, hasAnn, removeAnn, removeAnn, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetName, getZName, setNameprotected ProcessSignatureImpl()
object factory.protected ProcessSignatureImpl(BaseFactory factory)
public static boolean countingFinaliser()
public static long instancesFinalised()
public boolean equals(Object obj)
equals in class CircusSignatureImplpublic int hashCode()
hashCode in class CircusSignatureImplpublic <R> R accept(Visitor<R> v)
accept in interface Termaccept in class CircusSignatureImplpublic ProcessSignatureImpl create(Object[] args)
public Object[] getChildren()
getChildren in interface Termpublic static long instanceCount()
public ZNameList getGenFormals()
ProcessSignaturegetGenFormals in interface ProcessSignaturepublic void setGenFormals(ZNameList genFormals)
ProcessSignaturesetGenFormals in interface ProcessSignaturegenFormals - the GenFormals element.ProcessSignature.getGenFormals()public ListTerm<SignatureList> getSignatureList()
ProcessSignatureReturns the SignatureList 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).
getSignatureList in interface ProcessSignaturepublic ChannelSetList getProcessChannelSets()
ProcessSignaturegetProcessChannelSets in interface ProcessSignaturepublic void setProcessChannelSets(ChannelSetList processChannelSets)
ProcessSignaturesetProcessChannelSets in interface ProcessSignatureprocessChannelSets - the ProcessChannelSets element.ProcessSignature.getProcessChannelSets()public StateUpdate getStateUpdate()
ProcessSignaturegetStateUpdate in interface ProcessSignaturepublic void setStateUpdate(StateUpdate stateUpdate)
ProcessSignaturesetStateUpdate in interface ProcessSignaturestateUpdate - the StateUpdate element.ProcessSignature.getStateUpdate()public CallUsage getCallUsage()
ProcessSignaturegetCallUsage in interface ProcessSignaturepublic void setCallUsage(CallUsage callUsage)
ProcessSignaturesetCallUsage in interface ProcessSignaturecallUsage - the CallUsage element.ProcessSignature.getCallUsage()public Name getProcessName()
ProcessSignaturegetProcessName in interface ProcessSignaturepublic ZName getProcessZName()
ProcessSignaturegetProcessZName in interface ProcessSignaturepublic void setProcessName(Name name)
ProcessSignaturesetProcessName in interface ProcessSignaturename - the process namepublic CircusChannelSetList getCircusProcessChannelSets()
ProcessSignaturegetCircusProcessChannelSets in interface ProcessSignaturepublic ZSignatureList getMainSignatures()
ProcessSignaturegetMainSignatures in interface ProcessSignaturepublic Signature getFormalParamsOrIndexes()
ProcessSignaturegetFormalParamsOrIndexes in interface ProcessSignaturepublic Signature setFormalParamsOrIndexes(Signature sig)
ProcessSignaturesetFormalParamsOrIndexes in interface ProcessSignaturesig - new non-null (possibly empty) state signaturepublic Signature getStateSignature()
ProcessSignaturegetStateSignature in interface ProcessSignaturepublic Signature setStateSignature(Signature sig)
ProcessSignaturesetStateSignature in interface ProcessSignaturesig - new non-null (possibly empty) state signaturepublic ProcessSignatureList getProcessSignatures()
ProcessSignaturegetProcessSignatures in interface ProcessSignaturepublic boolean isBasicProcessSignature()
ProcessSignatureisBasicProcessSignature in interface ProcessSignaturepublic boolean isEmptyProcessSignature()
ProcessSignatureisEmptyProcessSignature in interface ProcessSignaturepublic ZSignatureList getBasicProcessLocalZSignatures()
ProcessSignaturegetBasicProcessLocalZSignatures in interface ProcessSignaturepublic ActionSignatureList getActionSignatures()
ProcessSignaturegetActionSignatures in interface ProcessSignatureprotected <K,V> void addToMapAndCheckConsistency(Map<K,V> map, K key, V value)
map - key - value - protected ZName fullQualifiedName(ZName procName, ZName actionName)
procName - actionName - public Map<ZName,ZSignatureList> getLocalZSignatures()
ProcessSignature
java.util.Map result = new java.util.HashMap();
if (isBasicProcessSignature())
{
assert !result.containsKey(getProcessZName());
result.put(getProcessZName(), getBasicProcessLocalZSignatures());
}
else
{
for (net.sourceforge.czt.circus.ast.ProcessSignature pSig : getProcessSignatures())
{
for(java.util.Map.Entry entry : pSig.getLocalZSignatures().entrySet())
{
assert !result.containsKey(entry.getKey());
result.put(entry.getKey(), entry.getValue());
}
}
}
return result;
The getActions() method have a similar pattern but access getActionSignatures() within the ProcessSignature instancegetLocalZSignatures in interface ProcessSignaturepublic Map<ZName,ActionSignatureList> getActions()
ProcessSignaturegetActions in interface ProcessSignaturepublic Map<ZName,Signature> getUsedChannels()
ProcessSignature
java.util.Map result = new java.util.HashMap();
if (isBasicProcessSignature())
{
for (net.sourceforge.czt.circus.ast.ActionSignature aSig : getActionSignatures())
{
assert !result.containsKey(aSig.getActionZName());
result.put(aSig.getActionZName(), aSig.getUsedChannels());
}
}
else
{
net.sourceforge.czt.z.ast.ZName procName = getProcessZName();
for (net.sourceforge.czt.circus.ast.ProcessSignature pSig : getProcessSignatures())
{
for(java.util.Map.Entry entry : pSig.getUsedChannels().entrySet())
{
net.sourceforge.czt.z.ast.ZName newKey = fullQualifiedName(procName, entry.getKey());
assert !result.containsKey(newKey);
result.put(newKey, entry.getValue());
}
}
}
return result;
The remaining methods have a similar pattern but access different (corresponding) lists
within getActionSignatures() for all ProcessSignature instances in getProcessSignatures().getUsedChannels in interface ProcessSignaturepublic List<NameTypePair> getUsedChannelsAsList()
getUsedChannelsAsList in interface ProcessSignaturepublic Map<ZName,CircusCommunicationList> getUsedCommunications()
ProcessSignaturegetUsedCommunications in interface ProcessSignaturepublic List<Communication> getUsedCommunicationsAsList()
getUsedCommunicationsAsList in interface ProcessSignaturepublic Map<ZName,CircusChannelSetList> getUsedChannelSets()
ProcessSignaturegetUsedChannelSets in interface ProcessSignaturepublic List<ChannelSet> getUsedChannelSetsAsList()
getUsedChannelSetsAsList in interface ProcessSignaturepublic Map<ZName,CircusNameSetList> getUsedNameSets()
ProcessSignaturegetUsedNameSets in interface ProcessSignaturepublic List<NameSet> getUsedNameSetsAsList()
getUsedNameSetsAsList in interface ProcessSignatureCopyright © 2003–2016 Community Z Tools Project. All rights reserved.