public final class SmcParameter extends SmcElement implements java.lang.Comparable<SmcParameter>
SmcTransition
SmcElement.TransType
Modifier and Type | Field and Description |
---|---|
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.
|
_lineNumber, _name, NIL_STATE
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
getLineNumber, getName, merge
public static final java.lang.String TCL_VALUE_TYPE
public static final java.lang.String TCL_REFERENCE_TYPE
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.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
Copyright © 2015. Charles W. Rapp. All Rights Reserved. Use is subject to license terms.