Resolved class

An annotation used to mark classes for which AOT-compatible runtime resolvers should be generated.

When a class is annotated with @Resolved, the RuntimeResolverGenerator will create a RuntimeHint for it, enabling dynamic operations like instance creation, method invocation, and field access in AOT environments.

This annotation can also be applied to other annotations. If a class is annotated with an annotation that itself has @Resolved, the class will also be processed for resolver generation.

Example:

@Resolved()
class MyService {
  MyService();
  String greet(String name) => 'Hello, $name!';
}

@Resolved()
@Component() // If @Component itself has @Resolved, MyComponent will be resolved
class MyComponent {
  MyComponent();
}
Inheritance
Annotations
  • @Target.new({TargetKind.classType})

Constructors

Resolved()
const

Properties

annotationType Type
Returns the annotation _type of this annotation.
no setteroverride
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