final class · System.Bindings

Place

final class Place

Where the description is: the namespace, class and file lines written when they change.

Tipo
final class
Espacio de nombres
System.Bindings
Ensamblado
System.Bindings
Acceso
internal, final
Archivo fuente
Profile.ant

Herencia

Clases base
Any Place

Constructores

new(StringBuilder text, str ns, str cls)
#

Métodos

At(str wantNamespace, str wantClass, str wantFile)
#

Miembros privados e internos (4)

private

str ns
#

private

str cls
#

private

str file
#

private

Miembros heredados (5)

Código fuente

Place en Antril, descompilado a partir de su Larva HIR.

System.Bindings.Place.ant
// System.Bindings.Place — System.Bindings (decompiled from Larva HIR)

import System;

into namespace System.Bindings
{
	/// Where the description is: the `namespace`, `class` and `file` lines written when they change.
	final class Place
	{
		StringBuilder text;
		str ns;
		str cls;
		str file;

		public:
			new(StringBuilder text, str ns, str cls)
			{
				file = "";
				this.text = text;
				this.ns = ns;
				this.cls = cls;
			}

			At(str wantNamespace, str wantClass, str wantFile)
			{
				if (wantFile.Length > 0 && wantFile != file)
				{
					file = wantFile;
					text.Append("file ").Append(file).Append("\n");
				}
				if (wantNamespace != ns)
				{
					ns = wantNamespace;
					text.Append("namespace ").Append(ns).Append("\n");
				}
				if (wantClass != cls)
				{
					cls = wantClass;
					text.Append("class ").Append(cls).Append("\n");
				}
			}
	}
}
Esc