AutowiredIgnore class

An annotation used to mark a field as ignored by the dependency injection container.

This annotation is applied at the field level. It signals the container to skip this field during dependency injection, even if it is marked as @Autowired or @RequiredAll.

Example

@Service()
class OrderService {
  @AutowiredIgnore()
  late Config config;

  late UserService userService;       // auto-injected
  late PaymentService paymentService; // auto-injected

  OrderService();
}

By default, all fields are required unless marked as nullable. This ensures strict correctness in service wiring.

Annotations
  • @Target.new({TargetKind.field})

Constructors

AutowiredIgnore()
An annotation used to mark a field as ignored by the dependency injection container.
const

Properties

annotationType Type
Returns the annotation _type of this annotation.
no setter
hashCode int
Returns a hash code consistent with equality definition.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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.
inherited

Operators

operator ==(Object other) bool
Checks if this annotation is equal to another object.
inherited