TipNameGenerator

gapt.formats.tip.util.TipNameGenerator
class TipNameGenerator(initiallyUsed: Iterable[String]) extends NameGenerator

Attributes

Source
TipNameGenerator.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Inherited methods

Creates a new name generator from this name generator.

Creates a new name generator from this name generator.

Attributes

Returns

The new name generator does not generate any names that have so far been generated by this name generator, moreover it does not generate names that are contained in the initially used names of this name generator.

Inherited from:
NameGenerator
Source
NameGenerator.scala
def fresh(name: String): String

Generates fresh names.

Generates fresh names.

Value parameters

name

The name for which a fresh variant is to be generated.

Attributes

Returns

Returns name if name does not occur in the initially used names and name has not yet been generated by this name generator. Otherwise, a name of the formname is returned, such that name has not been generated by a previous call to this method.

Inherited from:
NameGenerator
Source
NameGenerator.scala

Generates a stream of fresh variants.

Generates a stream of fresh variants.

Value parameters

name

The name for which a stream of fresh variants is to be generated.

Attributes

Returns

A stream of fresh variants of the form name_ .

Inherited from:
NameGenerator
Source
NameGenerator.scala
def freshWithIndex(baseName: Int => String): String

Generates a fresh variant of a name.

Generates a fresh variant of a name.

Value parameters

baseName

The pattern based on which names are generated. For every distinct non-negative integers i and j, baseName(i) and baseName(j) must be distinct names.

Attributes

Returns

A name of the form baseName(n) that has not been generated by any previous call to this name generator and such that n is the least non-negative integer with this property. Furthermore the subsequent names generated by this name generator will not include baseName(n).

Inherited from:
NameGenerator
Source
NameGenerator.scala

Generates a fresh variant of a name.

Generates a fresh variant of a name.

Value parameters

name

The name for which a fresh variant is to be generated.

Attributes

Returns

Returns a name of the form name_ , such that this name has not been generated by any previous call to this name generator.

Inherited from:
NameGenerator
Source
NameGenerator.scala