Naming enum
Configuration options and utilities for naming and renaming signals.
Connected, equivalent whole signals with compatible types may share one generated signal when their preserved names match exactly in the generated module's namespace, before uniquification. This applies to both reserved and renameable signals, including connections to ports. The name remains present, but each original signal need not have a separate declaration. Matching names alone do not establish equivalence.
Values
- reserved → const Naming
-
The signal will be present in generated output and the name will not be changed.
Equivalent signals requesting this same name may share a declaration. If the exact name cannot be preserved, including a collision with an unrelated signal, an Exception will be thrown.
- renameable → const Naming
-
The signal will be present in generated output, but the signal may be renamed for uniqueness. Equivalent signals requesting this same name may share a declaration, but distinct preserved names will not be merged.
- mergeable → const Naming
-
The signal may be merged with other equivalent signals in generated outputs, and any of the names from the merged signals may be selected.
- unnamed → const Naming
-
This signal has no given name and generated output will attempt to name it as best as it can.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
chooseCloneNaming(
{required String originalName, required String? newName, required Naming originalNaming, required Naming? newNaming}) → Naming - Picks a Naming for a clone based on its original conditions and optionally provided new conditions.
-
chooseName(
String? name, Naming? naming, {String nullStarter = 's'}) → String -
Picks a String name based on an initial
nameandnaming. -
chooseNaming(
String? name, Naming? naming) → Naming -
Picks a Naming based on an initial
nameandnaming. -
isUnpreferred(
String name) → bool - Returns true iff the signal name is "unpreferred".
-
unpreferredName(
String name) → String - Makes a signal name "unpreferred" when considering between multiple possible signal names.
-
validatedName(
String? name, {required bool reserveName}) → String? -
Returns
nameif it meets requirements for the specifiedreserveName, otherwise throws an Exception.