|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ConForM.CoopnTools.CoKer.CoalaMgr.CoalaElement | +--ConForM.CoopnTools.CoKer.CoalaMgr.CoalaSymbol
Coala symbols. This abstract class essentially defines basic symbols in the coala asbtract syntax. This class must de extended in immutable classes, by defining "kind", "equals", "equivalents", "toString", "toText", "toDigest" and "clone" methods. In addition, for each textual attribute attr_i of type Attr_i, a private attribute variable must be defined, a constructor with parameters "(Attr_1 attr_1, ... , Attr_n attr_n)" must be defined, and n methods "Attr_i attr_i()" returning the value of the attribute must be defined.
Constructor Summary | |
protected |
CoalaSymbol(CoalaName name,
CoalaModuleName module)
Simple constructor. |
protected |
CoalaSymbol(CoalaName name,
CoalaModuleName module,
java.lang.String comment)
Simple constructor. |
protected |
CoalaSymbol(CoalaName name,
java.lang.String identifier,
CoalaModuleName module)
Simple constructor. |
protected |
CoalaSymbol(CoalaName name,
java.lang.String identifier,
CoalaModuleName module,
java.lang.String comment)
Simple constructor. |
Method Summary | |
protected CoalaElement |
cloneCoalaElement()
Internal cloning method. |
java.lang.String |
comment()
Return the comment. |
protected boolean |
equalsCoalaSymbol(CoalaSymbol s)
Internal equality testing method. |
abstract boolean |
equivalent(java.lang.Object s)
Equivalence testing method. |
protected boolean |
equivalentCoalaSymbol(CoalaSymbol s)
Internal equivalence testing method. |
int |
hashCode()
Hashcode method. |
java.lang.String |
identifier()
Return the identifier. |
abstract java.lang.String |
kind()
Kind retrieving method. |
CoalaModuleName |
module()
Return the module. |
CoalaName |
name()
Return the name. |
java.lang.String |
symbolModule()
Return the module name as a string. |
int |
symbolModuleKind()
Get the module kind (in the sense of the package manager) of the module defining the symbol, for instance COOPNSOURCE, COALASOURCE, PACKAGE, and so on). |
java.lang.String |
symbolName()
Return the name as a string. |
protected ConForM.CoopnTools.CoKer.CoalaMgr.CoalaTextMgr.CoalaTextName |
toTextCoalaSymbol()
Internal Text conversion method. |
Methods inherited from class ConForM.CoopnTools.CoKer.CoalaMgr.CoalaElement |
clone, equals, toCompleteString, toCompleteString, toCompleteString, toCompleteString, toCompleteString, toCompleteString, toCompleteText, toCompleteText, toString, toString, toString, toText |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ConForM.CoopnTools.CoKer.CoopnSyntacticElement |
clone, equals, toCompleteString, toCompleteString, toCompleteString, toString, toString, toString |
Constructor Detail |
protected CoalaSymbol(CoalaName name, java.lang.String identifier, CoalaModuleName module) throws java.lang.IllegalArgumentException
name
- the name. May be null if symbol has no name.identifier
- the identifier. The identifier is merely used
for the convenience of users, allowing them to
identify symbols even when they have no names.
Identifiers are not taking part in symbol
comparisons, for equality and for equivalence.module
- the definition module. Cannot be null.java.lang.IllegalArgumentException
- identifier or module are null references.protected CoalaSymbol(CoalaName name, CoalaModuleName module) throws java.lang.IllegalArgumentException
name
- the name and the identifier of the symbol.
Cannot be null.module
- the definition module. Cannot be null.java.lang.IllegalArgumentException
- name or module are null references.protected CoalaSymbol(CoalaName name, java.lang.String identifier, CoalaModuleName module, java.lang.String comment) throws java.lang.IllegalArgumentException
name
- the name. May be null if symbol has no name.identifier
- the identifier. The identifier is merely used
for the convenience of users, allowing them to
identify symbols even when they have no names.
Identifiers are not taking part in symbol
comparisons, for equality and for equivalence.module
- the definition module. Cannot be null.java.lang.IllegalArgumentException
- identifier or module are null references.protected CoalaSymbol(CoalaName name, CoalaModuleName module, java.lang.String comment) throws java.lang.IllegalArgumentException
name
- the name and the identifier of the symbol.
Cannot be null.module
- the definition module. Cannot be null.java.lang.IllegalArgumentException
- name or module are null references.Method Detail |
public CoalaName name()
public java.lang.String symbolName()
symbolName
in interface CoopnSyntacticSymbol
public java.lang.String identifier()
identifier
in interface CoopnSyntacticSymbol
public CoalaModuleName module()
public java.lang.String symbolModule()
symbolModule
in interface CoopnSyntacticSymbol
public int symbolModuleKind()
symbolModuleKind
in interface CoopnSyntacticSymbol
public java.lang.String comment()
comment
in interface CoopnSyntacticSymbol
public abstract java.lang.String kind()
kind
in interface CoopnSyntacticSymbol
public abstract boolean equivalent(java.lang.Object s)
protected boolean equalsCoalaSymbol(CoalaSymbol s)
public int hashCode()
CoopnSyntacticElement
hashCode
in interface CoopnSyntacticElement
hashCode
in class CoalaElement
ConForM.CoopnTools.CoKer.CoopnSyntacticElement
protected boolean equivalentCoalaSymbol(CoalaSymbol s)
protected ConForM.CoopnTools.CoKer.CoalaMgr.CoalaTextMgr.CoalaTextName toTextCoalaSymbol()
protected CoalaElement cloneCoalaElement()
cloneCoalaElement
in class CoalaElement
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |