Overview | Package | Class | Tree | Deprecated | Index | Help
| SMC 6_0_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.smc.model
Class SmcParameter

    java.lang.Object
      net.sf.smc.model.SmcElement
          net.sf.smc.model.SmcParameter

All Implemented Interfaces:
  java.lang.Comparable<SmcParameter>

    public final class SmcParameter

extends SmcElement
implements java.lang.Comparable<SmcParameter>

This class contains a transition parameter definition. This includes the parameter name and type.

See Also:
  `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

### TCL_VALUE_TYPE

    public static final 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.

  See Also:
    Constant Field Values

### TCL_REFERENCE_TYPE

    public static final 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.

  See Also:
    Constant Field Values

Constructor Detail

### SmcParameter

    public 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.

  Parameters:
    `name` - the parameter name.
    `lineNumber` - where the parameter is defined in the .sm file.
    `type` - the parameter type.

Method Detail

### accept

    public void accept(SmcVisitor visitor)

  Description copied from class: `SmcElement`
  Accepts a new visitor which performs some action upon this abstract syntax tree element.

  Specified by:
    `accept` in class `SmcElement`
  Parameters:
    `visitor` - a parser visitor.

### compareTo

    public int compareTo(SmcParameter param)
                  throws java.lang.ClassCastException

  Returns an integer value <, equal to or > zero depending on whether `this` parameter is <, equal to or > `param`. The comparison is based on the name and type.

  Specified by:
    `compareTo` in interface `java.lang.Comparable<SmcParameter>`
  Parameters:
    `param` - compare with this parameter instance.
  Returns:
    an integer value <, equal to or > zero depending on whether `this` parameter is <, equal to or > `param`.
  Throws:
    `java.lang.ClassCastException`

### getType

    public java.lang.String getType()

  Returns the parameter type.

  Returns:
    the parameter type.

### setType

    public void setType(java.lang.String typeName)

  Sets the parameter type.

  Parameters:
    `typeName` - the parameter type text.

### equals

    public boolean equals(java.lang.Object obj)

  Returns `true` if `obj` is a non-`null` parameter instance with the same name and type; `false` otherwise.

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `obj` - compare with this object.
  Returns:
    `true` if `obj` is a non-`null` parameter instance with the same name and type; `false` otherwise.

### hashCode

    public int hashCode()

  Returns the hash code based on the parameter name and type.

  Overrides:
    `hashCode` in class `java.lang.Object`
  Returns:
    the hash code based on the parameter name and type.

### toString

    public java.lang.String toString()

  Returns the parameter text representation. The format is either name if type is an empty string and name[: type] if type is defined.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    the parameter text representation.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SMC 6_0_1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009. Charles W. Rapp. All Rights Reserved. Use is subject to license terms.