EnumCapability class abstract
Capability that enables metadata about enum type.
When an enum is annotated with a capability implementing this interface, the enum type and its annotations are registered in the metadata system.
Example:
class JsonEnum implements EnumCapability {
const JsonEnum();
}
@JsonEnum()
enum Status {
pending,
active,
completed
}
Generated metadata code:
metaBuilder.registerEnum<prefix0.Status>(
meta.enumMeta(
meta.type<prefix0.Status>(),
[prefix0.JsonEnum()],
),
);
- Implemented types
Constructors
- EnumCapability()
-
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
-
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