SimplePodNameGenerator class
Default implementation of the PodNameGenerator interface.
This generator produces pod names by taking the simple class name of the pod's type and decapitalizing the first character, following standard conventions.
For example, a class package:my_app/services/my_service.dart.MyService would be registered with the
name myService.
Acronyms or all-uppercase prefixes (e.g. URLService) are not decapitalized,
preserving the original class name casing.
This is the default pod name generation strategy used throughout the JetLeaf framework when no explicit pod name is provided via annotations or configuration.
Example usage:
final generator = SimplePodNameGenerator();
final podDef = RootPodDefinition(type: Class<UserService>());
final podName = generator.generate(podDef, registry);
print(podName); // 'userService'
- Implemented types
Constructors
- SimplePodNameGenerator()
-
Default implementation of the PodNameGenerator interface.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
generate(
PodDefinition definition, PodDefinitionRegistry registry) → String -
Strategy interface for generating pod names for PodDefinitions.
override
-
getPackageName(
) → String - Represents an abstraction for identifying the package that an object, resource, or service belongs to.
-
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