UseCase class
UseCase layer annotation - indicates application use case components
This annotation is a specialization of @Component for classes that
contain specific business use cases or application logic, following
Clean Architecture principles.
Use cases encapsulate application-specific business rules and orchestrate the flow of data to and from entities and repositories.
Example:
@UseCase()
class GetUserUseCase {
@Autowired()
late UserRepository userRepository;
Future<User?> execute(String userId) async {
return await userRepository.findById(userId);
}
}
Properties
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