ConForM.CoopnTools.CoKer.CoopnMgr
Class CoopnHeader

java.lang.Object
  |
  +--ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
        |
        +--ConForM.CoopnTools.CoKer.CoopnMgr.CoopnSection
              |
              +--ConForM.CoopnTools.CoKer.CoopnMgr.CoopnHeader
All Implemented Interfaces:
java.lang.Cloneable, CoopnSyntacticElement, CoopnSyntacticHeaderSection, CoopnSyntacticSection, java.io.Serializable

public class CoopnHeader
extends CoopnSection
implements CoopnSyntacticHeaderSection

Coopn header.

See Also:
CoopnSection, Serialized Form

Field Summary
static int ABSTRACT
           
static int GENERIC
           
static int NORMAL
           
static int PARAMETER
           
 
Constructor Summary
CoopnHeader(CoopnModuleName name, CoopnModuleNameList formalParams, CoopnModuleName as, int status)
          Simple constructor.
CoopnHeader(CoopnModuleName name, CoopnModuleNameList formalParams, CoopnModuleName as, int status, CoopnRealMorphism realMorphism)
          Simple constructor.
 
Method Summary
 void addMorphisms(CoopnMorphismField list)
           
 void addRenames(CoopnRenameField list)
           
 CoopnModuleName as()
           
 java.lang.String basedUpon()
          Get the module upon which this section is based.
 int basedUponKind()
          Get the module kind (in the sense of the package manager) of the module upon which this section is based, for instance COOPNSOURCE, COALASOURCE, PACKAGE, and so on).
 java.lang.Object clone()
          Cloning method.
 java.lang.String completeKindString(java.lang.String kind, CoopnEnv env)
           
 boolean equals(java.lang.Object obj)
          Equality method.
 CoopnSyntacticField[] fields()
          Get the fields of this section.
 CoopnModuleNameList formalParams()
           
 boolean hasAs()
           
 boolean hasBasedUpon()
          Test if this section is based upon another module.
 boolean hasFormalParams()
           
 int hashCode()
          Hashcode method.
 boolean hasRealMorphism()
           
 java.lang.String headerCompleteString(java.lang.String kind)
           
 java.lang.String headerCompleteString(java.lang.String kind, CoopnEnv env)
           
 java.lang.String headerString(java.lang.String kind)
           
 java.lang.String headerString(java.lang.String kind, CoopnEnv env)
           
 CoopnElement interpret(CoopnSubstitution sigma)
          Interpretation of this element according to a substitution.
 boolean isAbstract()
           
 java.lang.String kind()
          Kind retrieving method.
 CoopnMorphismField morphisms()
           
 CoopnModuleName name()
           
 java.lang.String paramString(CoopnEnv env)
           
 CoopnRealMorphism realMorphism()
           
 CoopnRenameField renames()
           
 int status()
           
 ConForM.CoopnTools.CoKer.CoopnMgr.CoopnCocoMgr.CoopnCocoElement toCoco(CoopnSymbolTable table)
          CoCo conversion method.
 ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toCompleteText(CoopnSymbolTable table)
          Complete textual elements conversion method.
 ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toText()
          Textual elements conversion method.
 java.lang.Object unmodifiableCopy()
          Copy the element into an unmodifiable structure.
static boolean validStatus(int status)
           
 
Methods inherited from class ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
cloneCoopnElement, pureCOIL, pureCOOPN, toCompleteString, toCompleteString, toCompleteString, toCompleteString, toCompleteString, toCompleteString, toCompleteText, toCompleteTokens, toCompleteTokens, toCompleteTokens, toCompleteTokens, toCompleteTokens, toCompleteTokens, toString, toString, toString, toTokens, toTokens, toTokens
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ConForM.CoopnTools.CoKer.CoopnSyntacticElement
toCompleteString, toCompleteString, toCompleteString, toString, toString, toString
 

Field Detail

NORMAL

public static final int NORMAL

GENERIC

public static final int GENERIC

PARAMETER

public static final int PARAMETER

ABSTRACT

public static final int ABSTRACT
Constructor Detail

CoopnHeader

public CoopnHeader(CoopnModuleName name,
                   CoopnModuleNameList formalParams,
                   CoopnModuleName as,
                   int status)
Simple constructor.

CoopnHeader

public CoopnHeader(CoopnModuleName name,
                   CoopnModuleNameList formalParams,
                   CoopnModuleName as,
                   int status,
                   CoopnRealMorphism realMorphism)
Simple constructor.
Method Detail

validStatus

public static boolean validStatus(int status)

interpret

public CoopnElement interpret(CoopnSubstitution sigma)
Description copied from class: CoopnElement
Interpretation of this element according to a substitution.
Overrides:
interpret in class CoopnElement
Following copied from class: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
Parameters:
sigma - the substitution; cannot be null
Returns:
a new CoopnElement object, coreesponding to the interpretation.

kind

public java.lang.String kind()
Description copied from interface: CoopnSyntacticSection
Kind retrieving method. This method must be defined in the inherited classes for returning a string allowing the user to know what kind of section this is.
Specified by:
kind in interface CoopnSyntacticSection
Overrides:
kind in class CoopnSection
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticSection
Returns:
a string defining the section kind.

fields

public CoopnSyntacticField[] fields()
Description copied from interface: CoopnSyntacticSection
Get the fields of this section.
Specified by:
fields in interface CoopnSyntacticSection
Overrides:
fields in class CoopnSection
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticSection
Returns:
The fields defined by this section.

hasBasedUpon

public boolean hasBasedUpon()
Test if this section is based upon another module.
Specified by:
hasBasedUpon in interface CoopnSyntacticHeaderSection
Returns:
true iff this section is based upon anither module.

basedUpon

public java.lang.String basedUpon()
Get the module upon which this section is based.
Specified by:
basedUpon in interface CoopnSyntacticHeaderSection
Returns:
The name of the module upon which this section is based, or null.

basedUponKind

public int basedUponKind()
Get the module kind (in the sense of the package manager) of the module upon which this section is based, for instance COOPNSOURCE, COALASOURCE, PACKAGE, and so on).
Specified by:
basedUponKind in interface CoopnSyntacticHeaderSection
Returns:
the module kind of the module upon which this section is based, iff this section is based upon a module; a meaningless value else.

name

public CoopnModuleName name()

formalParams

public CoopnModuleNameList formalParams()

as

public CoopnModuleName as()

status

public int status()

hasFormalParams

public boolean hasFormalParams()

hasAs

public boolean hasAs()

isAbstract

public boolean isAbstract()

hasRealMorphism

public boolean hasRealMorphism()

realMorphism

public CoopnRealMorphism realMorphism()

morphisms

public CoopnMorphismField morphisms()

renames

public CoopnRenameField renames()

addMorphisms

public void addMorphisms(CoopnMorphismField list)

addRenames

public void addRenames(CoopnRenameField list)

equals

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

hashCode

public int hashCode()
Description copied from interface: CoopnSyntacticElement
Hashcode method. Must be defined in the inherited classes.
Specified by:
hashCode in interface CoopnSyntacticElement
Overrides:
hashCode in class CoopnElement
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticElement
Returns:
the hash code.

toText

public ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toText()
Description copied from class: CoopnElement
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.
Overrides:
toText in class CoopnElement
Following copied from class: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
Returns:
a CoopnTextElement image.

toCompleteText

public ConForM.CoopnTools.CoKer.CoopnMgr.CoopnTextMgr.CoopnTextElement toCompleteText(CoopnSymbolTable table)
Description copied from class: CoopnElement
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.
Overrides:
toCompleteText in class CoopnElement
Following copied from class: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
Parameters:
table - the symbol table used to generate symbol references
Returns:
a CoopnTextElement image.

completeKindString

public java.lang.String completeKindString(java.lang.String kind,
                                           CoopnEnv env)

paramString

public java.lang.String paramString(CoopnEnv env)

headerString

public java.lang.String headerString(java.lang.String kind,
                                     CoopnEnv env)

headerString

public java.lang.String headerString(java.lang.String kind)

headerCompleteString

public java.lang.String headerCompleteString(java.lang.String kind,
                                             CoopnEnv env)

headerCompleteString

public java.lang.String headerCompleteString(java.lang.String kind)

toCoco

public ConForM.CoopnTools.CoKer.CoopnMgr.CoopnCocoMgr.CoopnCocoElement toCoco(CoopnSymbolTable table)
Description copied from class: CoopnElement
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.
Overrides:
toCoco in class CoopnElement
Following copied from class: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
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 java.lang.Object unmodifiableCopy()
Description copied from class: CoopnElement
Copy the element into an unmodifiable structure.
Overrides:
unmodifiableCopy in class CoopnElement
Following copied from class: ConForM.CoopnTools.CoKer.CoopnMgr.CoopnElement
Returns:
an unmodififable clone of the element.

clone

public java.lang.Object clone()
Description copied from interface: CoopnSyntacticElement
Cloning method. Must be defined in the inherited classes.
Specified by:
clone in interface CoopnSyntacticElement
Overrides:
clone in class CoopnElement
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticElement
Returns:
a clone object.