ConForM.CoopnTools.CoKer.SpecMgr
Class SpecModule

java.lang.Object
  |
  +--ConForM.CoopnTools.CoKer.SpecMgr.SpecElement
        |
        +--ConForM.CoopnTools.CoKer.SpecMgr.SpecModule
All Implemented Interfaces:
java.lang.Cloneable, CoopnSyntacticElement, CoopnSyntacticModule, java.io.Serializable

public final class SpecModule
extends SpecElement
implements CoopnSyntacticModule

Specification modules.

See Also:
SpecElement, Serialized Form

Constructor Summary
SpecModule(java.lang.String moduleName, CoopnCompilInfo info, SpecHeader header, SpecModuleSection modules, SpecBehaviourSection behaviour, SpecVariableSection variables, java.lang.String comment)
           
 
Method Summary
 SpecBehaviourSection behaviour()
           
 java.lang.Object clone()
          Cloning method.
 java.lang.String comment()
          Comment retrieving method.
 CoopnCompilInfo compilInfo()
          Return the compilation information associated to this module.
 java.lang.String completeKind()
          Complete kind retrieving method.
 boolean equals(java.lang.Object obj)
          Equality method.
 int hashCode()
          Hashcode method.
 boolean hasParameters()
          Look if this module has parameters,i.e. additional information to the complete kind.
 SpecHeader header()
           
 java.lang.String kind()
          Kind retrieving method.
 int moduleKind()
          Get the module kind (in the sense of the package manager) of this module, for instance COOPNSOURCE, COALASOURCE, PACKAGE, and so on).
 java.lang.String moduleName()
          Get the name.
 SpecModuleSection modules()
           
 java.lang.String parameters()
          Parameters retrieving method.
 CoopnSyntacticSection[] sections()
          Get the fields of this section.
 void setBehaviour(SpecBehaviourSection behaviour)
           
 void setComment(java.lang.String comment)
          Set the comment.
 void setModules(SpecModuleSection modules)
           
 void setVariables(SpecVariableSection variables)
           
 java.lang.String toString(CoopnEnv env, int indent)
          String conversion method.
 java.lang.Object unmodifiableCopy()
          Copy the element into an unmodifiable structure.
 SpecVariableSection variables()
           
 
Methods inherited from class ConForM.CoopnTools.CoKer.SpecMgr.SpecElement
cloneSpecElement, toCompleteString, toCompleteString, toCompleteString, toString, toString
 
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
 

Constructor Detail

SpecModule

public SpecModule(java.lang.String moduleName,
                  CoopnCompilInfo info,
                  SpecHeader header,
                  SpecModuleSection modules,
                  SpecBehaviourSection behaviour,
                  SpecVariableSection variables,
                  java.lang.String comment)
Method Detail

moduleName

public java.lang.String moduleName()
Description copied from interface: CoopnSyntacticModule
Get the name. Must be defined in the inherited classes.
Specified by:
moduleName in interface CoopnSyntacticModule
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticModule
Returns:
a String representation of the module name. Never null.

moduleKind

public int moduleKind()
Get the module kind (in the sense of the package manager) of this module, for instance COOPNSOURCE, COALASOURCE, PACKAGE, and so on).
Specified by:
moduleKind in interface CoopnSyntacticModule
Returns:
the module kind.

compilInfo

public CoopnCompilInfo compilInfo()
Description copied from interface: CoopnSyntacticModule
Return the compilation information associated to this module.
Specified by:
compilInfo in interface CoopnSyntacticModule

header

public SpecHeader header()

completeKind

public java.lang.String completeKind()
Complete kind retrieving method. This method must be defined in the inherited classes for returning a string allowing the user to know what kind of module this is, including building information such as "generic" or "abstract".
Specified by:
completeKind in interface CoopnSyntacticModule
Returns:
a string defining the module complete kind.

hasParameters

public boolean hasParameters()
Look if this module has parameters,i.e. additional information to the complete kind.
Specified by:
hasParameters in interface CoopnSyntacticModule
Returns:
boolean iff this module has parameters.

parameters

public java.lang.String parameters()
Parameters retrieving method. Parameters are additional information to the complete kind.
Specified by:
parameters in interface CoopnSyntacticModule
Returns:
a string defining the paremeters, or null.

modules

public SpecModuleSection modules()

setModules

public void setModules(SpecModuleSection modules)

variables

public SpecVariableSection variables()

setVariables

public void setVariables(SpecVariableSection variables)

behaviour

public SpecBehaviourSection behaviour()

setBehaviour

public void setBehaviour(SpecBehaviourSection behaviour)

comment

public java.lang.String comment()
Description copied from interface: CoopnSyntacticModule
Comment retrieving method. This method must be defined in the inherited classes for returning the comment associated to this symbol.
Specified by:
comment in interface CoopnSyntacticModule
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticModule
Returns:
a string defining the associated comment, or null iff no comment is associated to this symbol.

setComment

public void setComment(java.lang.String comment)
                throws java.lang.UnsupportedOperationException
Set the comment.
Parameters:
comment - the new comment
Throws:
java.lang.UnsupportedOperationException - the module is not modifiable.

kind

public java.lang.String kind()
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 CoopnSyntacticModule
Returns:
a string defining the section kind.

sections

public CoopnSyntacticSection[] sections()
Get the fields of this section.
Specified by:
sections in interface CoopnSyntacticModule
Returns:
The fields defined by this section.

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 SpecElement
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 SpecElement
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticElement
Returns:
the hash code.

toString

public java.lang.String toString(CoopnEnv env,
                                 int indent)
Description copied from interface: CoopnSyntacticElement
String conversion method. This routine converts an element into a string representing it. The string representation is intended to be readable from users. The string representation is not required to include the comments associated to the element, if any.
Specified by:
toString in interface CoopnSyntacticElement
Overrides:
toString in class SpecElement
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticElement
Parameters:
env - the environment deciding the form of the display. A null values indicates a default form.
indent - the identation factor. A zero value indicates no indentation at all.
Returns:
a String image of the element.

unmodifiableCopy

public java.lang.Object unmodifiableCopy()
Description copied from class: SpecElement
Copy the element into an unmodifiable structure.
Overrides:
unmodifiableCopy in class SpecElement
Following copied from class: ConForM.CoopnTools.CoKer.SpecMgr.SpecElement
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 SpecElement
Following copied from interface: ConForM.CoopnTools.CoKer.CoopnSyntacticElement
Returns:
a clone object.