|
SMC 6_0_1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.smc.model.SmcElement
net.sf.smc.model.SmcParameter
public final class SmcParameter
This class contains a transition parameter definition. This includes the parameter name and type.
SmcTransition
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.smc.model.SmcElement |
---|
SmcElement.TransType |
Field Summary | |
---|---|
static java.lang.String |
TCL_REFERENCE_TYPE
Since Tcl is a typeless programming language, use this "type" if the parameter is to be accessed by reference. |
static java.lang.String |
TCL_VALUE_TYPE
Since Tcl is a typeless programming language, use this "type" if the parameter is to be accessed by value. |
Fields inherited from class net.sf.smc.model.SmcElement |
---|
_lineNumber, _name, NIL_STATE |
Constructor Summary | |
---|---|
SmcParameter(java.lang.String name,
int lineNumber,
java.lang.String type)
Creates a parameter instance with the given name, type and .sm file line number location. |
Method Summary | |
---|---|
void |
accept(SmcVisitor visitor)
Accepts a new visitor which performs some action upon this abstract syntax tree element. |
int |
compareTo(SmcParameter param)
Returns an integer value <, equal to or > zero depending on whether this parameter is <,
equal to or > param . |
boolean |
equals(java.lang.Object obj)
Returns true if obj is a non-null
parameter instance with the same name and type;
false otherwise. |
java.lang.String |
getType()
Returns the parameter type. |
int |
hashCode()
Returns the hash code based on the parameter name and type. |
void |
setType(java.lang.String typeName)
Sets the parameter type. |
java.lang.String |
toString()
Returns the parameter text representation. |
Methods inherited from class net.sf.smc.model.SmcElement |
---|
getLineNumber, getName, merge |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TCL_VALUE_TYPE
public static final java.lang.String TCL_REFERENCE_TYPE
Constructor Detail |
---|
public SmcParameter(java.lang.String name, int lineNumber, java.lang.String type)
name
- the parameter name.lineNumber
- where the parameter is defined in the
.sm file.type
- the parameter type.Method Detail |
---|
public void accept(SmcVisitor visitor)
SmcElement
accept
in class SmcElement
visitor
- a parser visitor.public int compareTo(SmcParameter param) throws java.lang.ClassCastException
this
parameter is <,
equal to or > param
. The comparison is based
on the name and type.
compareTo
in interface java.lang.Comparable<SmcParameter>
param
- compare with this parameter instance.
this
parameter is <,
equal to or > param
.
java.lang.ClassCastException
public java.lang.String getType()
public void setType(java.lang.String typeName)
typeName
- the parameter type text.public boolean equals(java.lang.Object obj)
true
if obj
is a non-null
parameter instance with the same name and type;
false
otherwise.
equals
in class java.lang.Object
obj
- compare with this object.
true
if obj
is a non-null
parameter instance with the same name and type;
false
otherwise.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
SMC 6_0_1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |