Files
2026-11-06 21:43:25 +05:30

15 lines
696 B
Plaintext

-- retention: annotations reflection can see on Base
[@com.ankurm.demo.annotations.Tracked(priority=5, value="", level=NORMAL, tags={})]
-- members and defaults
default value="" priority=5 level=NORMAL tags=[]
explicit value="billing" priority=9 level=HIGH tags=[pci, money]
-- @Inherited: Child extends Base, Child itself has no annotations
getAnnotation(Tracked) = true
getDeclaredAnnotation(Tracked) = false
-- @Repeatable
Staff direct getAnnotations().length = 1 (Roles container)
Staff getAnnotationsByType(Role) = [admin, auditor]
Solo getAnnotation(Role) != null = true
Solo getAnnotation(Roles) != null = false
Solo getAnnotationsByType(Role) = [admin]