Marker interface for class-level Locorda annotations.
Classes implementing this interface are designed to be used as
class-level annotations (e.g., @RootResource, @GroupKey).
This distinguishes them from:
- Parameter classes like FullIndex or MergeContract (passed as constructor arguments)
- Property-level annotations like
@CrdtLwwRegisteror@RdfProperty(applied to fields)
Usage
✅ Class-level annotations (implement this interface):
@RootResource(...) // ← Annotation (implements LocordaAnnotation)
class Note { }
@GroupKey(...) // ← Annotation (implements LocordaAnnotation)
class NoteGroupKey { }
❌ Parameter classes (do NOT implement this interface):
@RootResource(
classIri,
MergeContract(...), // ← Parameter class
fullIndex: FullIndex(...), // ← Parameter class
)
class Note { }
❌ Property-level annotations (do NOT implement this interface):
@RootResource(...)
class Note {
@CrdtLwwRegister() // ← Property annotation (different scope)
String? title;
}
This design makes the API boundaries explicit and enables tooling to programmatically distinguish between annotation types.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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