Repository class

Marks a class as a repository for use with generic repository patterns, reflection, and code generation.

This annotation is intended to be applied to classes that serve as repositories for entities, typically extending Repository, CrudRepository, or their specialized variants.

Usage Example

@Repository()
class UserRepository extends CrudRepository<User, String> {}

Design Notes

  • Used with reflection via reflectable for runtime or code-generation operations.
  • Can be combined with @Generic for generic repository types.
  • The annotation itself does not implement any repository behavior; it simply marks classes for tooling and runtime inspection.

See Also

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

Constructors

Repository()
Marks a class as a repository for use with generic repository patterns, reflection, and code generation.
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