| 
1 | 1 | /**  | 
2 |  | - * @brief Describe an annotated relation.  | 
 | 2 | + * @brief Relationship between annotation and annotated element  | 
 | 3 | + * @corresponds Java AST: Connection between annotation node and target  | 
 | 4 | + * @example  | 
 | 5 | + * <pre>{@code  | 
 | 6 | + * @interface Entity {}  | 
 | 7 | + *   | 
 | 8 | + * @Entity  | 
 | 9 | + * class User {  | 
 | 10 | + *     @Id  | 
 | 11 | + *     private Long id;  | 
 | 12 | + * }  | 
 | 13 | + * }</pre>  | 
3 | 14 |  */  | 
4 | 15 | schema AnnotatedRelation extends AnnotatedRelationDO {  | 
5 | 16 | 
 
  | 
6 | 17 | }  | 
 | 18 | + | 
7 | 19 | impl AnnotatedRelation {  | 
8 | 20 |     @data_constraint  | 
9 | 21 |     @inline  | 
@@ -38,9 +50,16 @@ impl AnnotatedRelation {  | 
38 | 50 |         }  | 
39 | 51 |     }  | 
40 | 52 | }  | 
 | 53 | + | 
 | 54 | + | 
 | 55 | +/**  | 
 | 56 | + * @brief Base class for annotation data storage  | 
 | 57 | + * @corresponds Java AST: Database structure for annotation nodes  | 
 | 58 | + */  | 
41 | 59 | schema AnnotationDo {  | 
42 | 60 |     @primary id: int  | 
43 | 61 | }  | 
 | 62 | + | 
44 | 63 | impl AnnotationDo {  | 
45 | 64 |     @data_constraint  | 
46 | 65 |     @inline  | 
@@ -168,8 +187,18 @@ impl AnnotationDo {  | 
168 | 187 |         }  | 
169 | 188 |     }  | 
170 | 189 | }  | 
 | 190 | + | 
 | 191 | + | 
171 | 192 | /**  | 
172 |  | - * @brief An access annotation.   | 
 | 193 | + * @brief Concrete annotation instance  | 
 | 194 | + * @corresponds Java AST: Annotation application node  | 
 | 195 | + * @example  | 
 | 196 | + * <pre>{@code  | 
 | 197 | + * @GetMapping("/users")  | 
 | 198 | + * public List<User> getUsers() {  | 
 | 199 | + *     // method implementation  | 
 | 200 | + * }  | 
 | 201 | + * }</pre>  | 
173 | 202 |  */  | 
174 | 203 | schema Annotation extends AnnotationDo {  | 
175 | 204 | 
 
  | 
@@ -370,8 +399,16 @@ impl AnnotationAccessArgumentDO {  | 
370 | 399 |         }  | 
371 | 400 |     }  | 
372 | 401 | }  | 
 | 402 | + | 
 | 403 | + | 
373 | 404 | /**  | 
374 |  | - * @brief An argument that applies to an annotation.  | 
 | 405 | + * @brief Concrete annotation argument value  | 
 | 406 | + * @corresponds Java AST: Argument value specification  | 
 | 407 | + * @example  | 
 | 408 | + * <pre>{@code  | 
 | 409 | + * @Retry(maxAttempts = 3, delay = 1000L)  | 
 | 410 | + * void process() {}  | 
 | 411 | + * }</pre>  | 
375 | 412 |  */  | 
376 | 413 | schema AnnotationAccessArgument extends AnnotationAccessArgumentDO {  | 
377 | 414 | 
 
  | 
@@ -515,8 +552,18 @@ impl AnnotationAccessArgument {  | 
515 | 552 |         }  | 
516 | 553 |     }  | 
517 | 554 | }  | 
 | 555 | + | 
 | 556 | + | 
518 | 557 | /**  | 
519 |  | - * @brief Represents an array used as a value of an annotation element. For example: @Endorsers({"Children", "Unscrupulous dentists"})  | 
 | 558 | + * @brief Annotation array initializer  | 
 | 559 | + * @example  | 
 | 560 | + * <pre>{@code  | 
 | 561 | + * @Authors({  | 
 | 562 | + *     @Author(name = "Alice"),  | 
 | 563 | + *     @Author(name = "Bob")  | 
 | 564 | + * })  | 
 | 565 | + * class Book {}  | 
 | 566 | + * }</pre>  | 
520 | 567 |  */  | 
521 | 568 | schema AnnotationArrayInitializer extends AnnotationArrayInitializerDO {  | 
522 | 569 | 
 
  | 
@@ -579,8 +626,17 @@ impl AnnotationArrayInitializer {  | 
579 | 626 |         }  | 
580 | 627 |     }  | 
581 | 628 | }  | 
 | 629 | + | 
 | 630 | + | 
582 | 631 | /**  | 
583 |  | - * @brief An annotation that applies to a declaration.  | 
 | 632 | + * @brief Annotation type declaration  | 
 | 633 | + * @example  | 
 | 634 | + * <pre>{@code  | 
 | 635 | + * @interface Scheduled {  | 
 | 636 | + *     String cron();  | 
 | 637 | + *     boolean enableRetry() default false;  | 
 | 638 | + * }  | 
 | 639 | + * }</pre>  | 
584 | 640 |  */  | 
585 | 641 | schema AnnotationDeclaration extends AnnotationDeclarationDO {  | 
586 | 642 | 
 
  | 
@@ -622,8 +678,19 @@ impl AnnotationDeclaration {  | 
622 | 678 |         }  | 
623 | 679 |     }  | 
624 | 680 | }  | 
 | 681 | + | 
 | 682 | + | 
625 | 683 | /**  | 
626 |  | - * @brief A parameter that applied to a annotation declaration.  | 
 | 684 | + * @brief Parameter definition in annotation type declarations  | 
 | 685 | + * @corresponds Java AST: AnnotationTypeElementDeclaration node  | 
 | 686 | + * @example  | 
 | 687 | + * <pre>{@code  | 
 | 688 | + * @interface TestConfig {  | 
 | 689 | + *     // Represents two parameters  | 
 | 690 | + *     int timeout() default 30;    // AnnotationDeclarationParameter 1  | 
 | 691 | + *     String[] cases();            // AnnotationDeclarationParameter 2  | 
 | 692 | + * }  | 
 | 693 | + * }</pre>  | 
627 | 694 |  */  | 
628 | 695 | schema AnnotationDeclarationParameter extends AnnotationDeclarationParameterDO {  | 
629 | 696 | 
 
  | 
@@ -688,8 +755,20 @@ impl AnnotationDeclarationParameter {  | 
688 | 755 |         }  | 
689 | 756 |     }  | 
690 | 757 | }  | 
 | 758 | + | 
691 | 759 | /**  | 
692 |  | - * @brief Default value for an annotation parameter, if any.  | 
 | 760 | + * @brief Default value specification for annotation parameters  | 
 | 761 | + * @corresponds Java AST: AnnotationTypeElementDefaultValue node  | 
 | 762 | + * @example  | 
 | 763 | + * <pre>{@code  | 
 | 764 | + * @interface TimeoutConfig {  | 
 | 765 | + *     // Parameter with default value  | 
 | 766 | + *     int duration() default 30;  // ← This default clause  | 
 | 767 | + *       | 
 | 768 | + *     // Parameter without default  | 
 | 769 | + *     String unit();  | 
 | 770 | + * }  | 
 | 771 | + * }</pre>  | 
693 | 772 |  */  | 
694 | 773 | schema AnnotationDeclarationParameterDefaultValue extends AnnotationDeclarationParameterDefaultValueDO {  | 
695 | 774 | 
 
  | 
 | 
0 commit comments