scala

class Symbol

[source: scala/Symbol.scala]

case final class Symbol(val name : String)
extends Product

Instances of Symbol can be created easily with Scala's built-in quote mechanism.

For instance, the Scala term 'mysym will invoke the constructor of the Symbol class in the following way: new Symbol("mysym").

Author
Martin Odersky
Version
1.7, 08/12/2003
Method Summary
override def equals (arg0 : Any) : Boolean
override def hashCode : Int
def intern : Symbol

Makes this symbol into a unique reference.

If two interened symbols are equal (i.e. they have the same name) then they must be identical (wrt reference equality).

override final def productArity : Int
return k for a product A(x_1,...,x_k))
override final def productElement (arg0 : Int) : Any
for a case class A(x_1,...,x_k)), returns x_(i+1) for 0 <= i < k
override final def productPrefix : String
By default the empty string. Implementations may override this method in order to prepend a string prefix to the result of the toString methods.
override def toString : String
Converts this symbol to a string.
Methods inherited from Product
element, arity
Methods inherited from AnyRef
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf