ConForM.CoopnTools.CoKer.CoopnMgr
Class CoopnElement

java.lang.Object
  |
  +--ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
All Implemented Interfaces:
java.lang.Cloneable, CoopnSyntacticElement, java.io.Serializable
Direct Known Subclasses:
CoopnAtom, CoopnCondition, CoopnElementList, CoopnEvent, CoopnMark, CoopnMigrationType, CoopnModule, CoopnModuleName, CoopnName, CoopnSection, CoopnSymbol, CoopnSync, CoopnTerm, CoopnType

public abstract class CoopnElement
extends java.lang.Object
implements CoopnSyntacticElement

Coopn elements.

See Also:
Serialized Form

Constructor Summary
CoopnElement()
           
 
Method Summary
abstract  java.lang.Object clone()
          Cloning method.
protected  CoopnElement cloneCoopnElement()
          Internal cloning method.
abstract  boolean equals(java.lang.Object obj)
          Equality method.
abstract  int hashCode()
          Hashcode method.
abstract  CoopnElement interpret(CoopnSubstitution sigma)
          Interpretation of this element according to a substitution.
 boolean pureCOIL()
          Pure COIL-COOPN2C verification method.
 boolean pureCOOPN()
          Pure COOPN verification method.
abstract  ConForM.CoopnTools.CoKer.CoopnMgr.CoopnCocoMgr.CoopnCocoElement toCoco(CoopnSymbolTable table)
          CoCo conversion method.
 java.lang.String toCompleteString()
          Complete string method.
 java.lang.String toCompleteString(CoopnEnv env)
          Complete string conversion method.
 java.lang.String toCompleteString(CoopnEnv env, int indent)
          Complete string conversion method.
 java.lang.String toCompleteString(CoopnSymbolTable table)
          Complete string method.
 java.lang.String toCompleteString(CoopnSymbolTable table, CoopnEnv env)
          Complete string conversion method.
 java.lang.String toCompleteString(CoopnSymbolTable table, CoopnEnv env, int indent)
          Complete string conversion method.
 ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toCompleteText()
          Complete textual elements conversion method.
abstract  ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toCompleteText(CoopnSymbolTable table)
          Complete textual elements conversion method.
 void toCompleteTokens(LexicalTokenList tokens)
          Complete Token method.
 void toCompleteTokens(LexicalTokenList tokens, CoopnEnv env)
          Complete Token conversion method.
 void toCompleteTokens(LexicalTokenList tokens, CoopnEnv env, int indent)
          Complete Token conversion method.
 void toCompleteTokens(LexicalTokenList tokens, CoopnSymbolTable table)
          Complete Token method.
 void toCompleteTokens(LexicalTokenList tokens, CoopnSymbolTable table, CoopnEnv env)
          Complete Token conversion method.
 void toCompleteTokens(LexicalTokenList tokens, CoopnSymbolTable table, CoopnEnv env, int indent)
          Complete Token conversion method.
 java.lang.String toString()
          String conversion method.
 java.lang.String toString(CoopnEnv env)
          String conversion method.
 java.lang.String toString(CoopnEnv env, int indent)
          String conversion method.
abstract  ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toText()
          Textual elements conversion method.
 void toTokens(LexicalTokenList tokens)
          Token conversion method.
 void toTokens(LexicalTokenList tokens, CoopnEnv env)
          Token conversion method.
 void toTokens(LexicalTokenList tokens, CoopnEnv env, int indent)
          Token conversion method.
abstract  java.lang.Object unmodifiableCopy()
          Copy the element into an unmodifiable structure.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoopnElement

public CoopnElement()
Method Detail

pureCOOPN

public boolean pureCOOPN()
Pure COOPN verification method. Must be modified by the elements which may alterate the result.
Returns:
true iff this object is in pure CO-OPN language.

pureCOIL

public boolean pureCOIL()
Pure COIL-COOPN2C verification method. Must be modified by the elements which may alterate the result.
Returns:
true iff this object is in pure COIL language.

interpret

public abstract CoopnElement interpret(CoopnSubstitution sigma)
Interpretation of this element according to a substitution.
Parameters:
sigma - the substitution; cannot be null
Returns:
a new CoopnElement object, coreesponding to the interpretation.

equals

public abstract boolean equals(java.lang.Object obj)
Equality method. Must be defined in the inherited classes.
Specified by:
equals in interface CoopnSyntacticElement
Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare
Returns:
true iff this object and the parameter are equals.

hashCode

public abstract int hashCode()
Hashcode method. Must be defined in the inherited classes.
Specified by:
hashCode in interface CoopnSyntacticElement
Overrides:
hashCode in class java.lang.Object
Returns:
the hash code.

toText

public abstract ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toText()
Textual elements conversion method. Must be defined in the inherited classes. This routine converts an element into a user-friendly textual element representing it. The string interpretation of this element is very intuitive by a user, but may be incorrect in the sense that it may be rejected by a checker.
Returns:
a CoopnTextElement image.

toCompleteText

public abstract ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toCompleteText(CoopnSymbolTable table)
Complete textual elements conversion method. Must be defined in the inherited classes. This routine converts an element into a correct textual element representing it. The string interpretation of this element will be accepted by a checker, but may be difficult to read by users, due to the additionnal information, like parenthesis and so on.
Parameters:
table - the symbol table used to generate symbol references
Returns:
a CoopnTextElement image.

toCompleteText

public ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toCompleteText()
Complete textual elements conversion method. Must be defined in the inherited classes. This routine converts an element into a correct textual element representing it. The string interpretation of this element will be accepted by a checker, but may be difficult to read by users, due to the additionnal information, like parenthesis and so on.
Returns:
a CoopnTextElement image.

toString

public java.lang.String toString(CoopnEnv env,
                                 int indent)
String conversion method. This routine converts an element into a string representing it, by transforming it using toText.
Specified by:
toString in interface CoopnSyntacticElement
Parameters:
env - the environment deciding the form of the display
indent - the identation factor
Returns:
a String image of the element.

toString

public java.lang.String toString(CoopnEnv env)
String conversion method. Use an identation of 0. This routine converts an element into a string representing it, by transforming it using toText.
Specified by:
toString in interface CoopnSyntacticElement
Parameters:
env - the environment deciding the form of the display
Returns:
a String image of the element.

toString

public java.lang.String toString()
String conversion method. Use no environment and an identation of 0. This routine converts an element into a string representing it, by transforming it using toText.
Specified by:
toString in interface CoopnSyntacticElement
Overrides:
toString in class java.lang.Object
Returns:
a String image of the element.

toCompleteString

public java.lang.String toCompleteString(CoopnSymbolTable table,
                                         CoopnEnv env,
                                         int indent)
Complete string conversion method. This routine converts an element into a string representing it, by transforming it using toText.
Parameters:
table - the symbol table used to generate symbol references
env - the environment deciding the form of the display
indent - the identation factor
Returns:
a String image of the element.

toCompleteString

public java.lang.String toCompleteString(CoopnSymbolTable table,
                                         CoopnEnv env)
Complete string conversion method. Use an identation of 0. This routine converts an element into a string representing it, by transforming it using toText.
Parameters:
table - the symbol table used to generate symbol references
env - the environment deciding the form of the display
Returns:
a String image of the element.

toCompleteString

public java.lang.String toCompleteString(CoopnSymbolTable table)
Complete string method. Use no environment and an identation of 0. This routine converts an element into a string representing it, by transforming it using toText.
Parameters:
table - the symbol table used to generate symbol references
Returns:
a String image of the element.

toCompleteString

public java.lang.String toCompleteString(CoopnEnv env,
                                         int indent)
Complete string conversion method. This routine converts an element into a string representing it, by transforming it using toText.
Specified by:
toCompleteString in interface CoopnSyntacticElement
Parameters:
env - the environment deciding the form of the display
indent - the identation factor
Returns:
a String image of the element.

toCompleteString

public java.lang.String toCompleteString(CoopnEnv env)
Complete string conversion method. Use an identation of 0. This routine converts an element into a string representing it, by transforming it using toText.
Specified by:
toCompleteString in interface CoopnSyntacticElement
Parameters:
env - the environment deciding the form of the display
Returns:
a String image of the element.

toCompleteString

public java.lang.String toCompleteString()
Complete string method. Use no environment and an identation of 0. This routine converts an element into a string representing it, by transforming it using toText.
Specified by:
toCompleteString in interface CoopnSyntacticElement
Returns:
a String image of the element.

toTokens

public void toTokens(LexicalTokenList tokens,
                     CoopnEnv env,
                     int indent)
Token conversion method. This routine converts an element into a LexicalTokenList representing it, by transforming it using toText.
Parameters:
tokens - the LexicalTokenList used as destination; cannot be null
env - the environment deciding the form of the display
indent - the identation factor

toTokens

public void toTokens(LexicalTokenList tokens,
                     CoopnEnv env)
Token conversion method. Use an identation of 0. This routine converts an element into a LexicalTokenList representing it, by transforming it using toText.
Parameters:
tokens - the LexicalTokenList used as destination; cannot be null
env - the environment deciding the form of the display

toTokens

public void toTokens(LexicalTokenList tokens)
Token conversion method. Use no environment and an identation of 0. This routine converts an element into a LexicalTokenList representing it, by transforming it using toText.
Parameters:
tokens - the LexicalTokenList used as destination; cannot be null

toCompleteTokens

public void toCompleteTokens(LexicalTokenList tokens,
                             CoopnSymbolTable table,
                             CoopnEnv env,
                             int indent)
Complete Token conversion method. This routine converts an element into a LexicalTokenList representing it, by transforming it using toText.
Parameters:
tokens - the LexicalTokenList used as destination; cannot be null
table - the symbol table used to generate symbol references
env - the environment deciding the form of the display
indent - the identation factor

toCompleteTokens

public void toCompleteTokens(LexicalTokenList tokens,
                             CoopnSymbolTable table,
                             CoopnEnv env)
Complete Token conversion method. Use an identation of 0. This routine converts an element into a LexicalTokenList representing it, by transforming it using toText.
Parameters:
tokens - the LexicalTokenList used as destination; cannot be null
table - the symbol table used to generate symbol references
env - the environment deciding the form of the display

toCompleteTokens

public void toCompleteTokens(LexicalTokenList tokens,
                             CoopnSymbolTable table)
Complete Token method. Use no environment and an identation of 0. This routine converts an element into a LexicalTokenList representing it, by transforming it using toText.
Parameters:
tokens - the LexicalTokenList used as destination; cannot be null
table - the symbol table used to generate symbol references

toCompleteTokens

public void toCompleteTokens(LexicalTokenList tokens,
                             CoopnEnv env,
                             int indent)
Complete Token conversion method. This routine converts an element into a LexicalTokenList representing it, by transforming it using toText.
Parameters:
tokens - the LexicalTokenList used as destination; cannot be null
env - the environment deciding the form of the display
indent - the identation factor

toCompleteTokens

public void toCompleteTokens(LexicalTokenList tokens,
                             CoopnEnv env)
Complete Token conversion method. Use an identation of 0. This routine converts an element into a LexicalTokenList representing it, by transforming it using toText.
Parameters:
tokens - the LexicalTokenList used as destination; cannot be null
env - the environment deciding the form of the display

toCompleteTokens

public void toCompleteTokens(LexicalTokenList tokens)
Complete Token method. Use no environment and an identation of 0. This routine converts an element into a LexicalTokenList representing it, by transforming it using toText.
Parameters:
tokens - the LexicalTokenList used as destination; cannot be null

toCoco

public abstract ConForM.CoopnTools.CoKer.CoopnMgr.CoopnCocoMgr.CoopnCocoElement toCoco(CoopnSymbolTable table)
                                                                                throws java.lang.IllegalArgumentException
CoCo conversion method. Must be defined in the inherited classes. This routine convert an element into a string representing it in a CO-opn COnpact form.
Parameters:
origin - the module which generated the Coco conversion
table - the symbol table used to generate symbol references
Returns:
a String image of the element.
Throws:
java.lang.IllegalArgumentException - A used symbol is not in the symbol table.

unmodifiableCopy

public abstract java.lang.Object unmodifiableCopy()
Copy the element into an unmodifiable structure.
Returns:
an unmodififable clone of the element.

cloneCoopnElement

protected CoopnElement cloneCoopnElement()
Internal cloning method. Should be used by the inherited classed for implementing their own "clone" method.
Returns:
a clone element.

clone

public abstract java.lang.Object clone()
Cloning method. Must be defined in the inherited classes.
Specified by:
clone in interface CoopnSyntacticElement
Overrides:
clone in class java.lang.Object
Returns:
a clone object.