# Role class

Declares the design role of a class or method within a Jetleaf application.

This annotation is intended for design-time metadata and architectural documentation. It can also be used by tooling (e.g., code generators, analyzers) to enforce architectural rules.

### Example

    @Role(DesignRole.APPLICATION)
    class UserService {
      Future<User> findById(String id) {
        // business logic here
      }
    }

    @Role(DesignRole.APPLICATION)
    class UserController {
      final UserService service;

      UserController(this.service);

      @Get('/users/:id')
      Future<User> getUser(String id) => service.findById(id);
    }

> Note: `@Role` is not required for Jetleaf runtime behavior, but it is highly recommended for clarity and tooling support.

Inheritance
  - Object
  - ReflectableAnnotation
  - Role
Mixed-in types
  - EqualsAndHashCode
Annotations
  - @Target({TargetKind.classType, TargetKind.method})

## Constructors

Role.new(DesignRole value)
  Declares the design role of a class or method within a Jetleaf application.
  const

## Properties

annotationType → Type
  Returns the annotation _type of this annotation.
  no setter override
hashCode → int
  The hash code for this object.
  no setter inherited
runtimeType → Type
  A representation of the runtime type of the object.
  no setter inherited
value → DesignRole
  Defines the architectural role of a component within a system.
  final

## Methods

equalizedProperties() → List<Object?>
  Mixin-style contract for value-based equality, `hashCode`, and `toString`.
  override
equals(Object other) → bool
  Checks whether the given object is logically equivalent to this annotation.
  inherited
noSuchMethod(Invocation invocation) → dynamic
  Invoked when a nonexistent method or property is accessed.
  inherited
toString() → String
  Returns a string representation of this annotation.
  override

## Operators

operator ==(Object other) → bool
  The equality operator.
  inherited