Class AppliedAnnotationObject.BuilderT

Direct Known Subclasses:
AppliedAnnotationObject.BuilderTM, AppliedAnnotationObject.BuilderTMF, HtmlLinkApplyAnnotation.Builder
Enclosing class:
AppliedAnnotationObject

Builder for applied annotations targeting classes.

Adds type-safe class targeting methods to the base builder:

Example:

// Target classes using type-safe references MyAnnotation annotation = MyAnnotation .create() .on(MyClass.class, MyOtherClass.class) // Stored as strings .onClass(ThirdClass.class) // Stored as Class object .build();

Notes:
  • Use on(Class...) when you want string-based matching (e.g., for configuration)
  • Use onClass(Class...) when you need direct Class object references
  • Both can be used together on the same builder
  • Constructor Details

    • BuilderT

      public BuilderT(Class<? extends Annotation> annotationType)
      Constructor.
      Parameters:
      annotationType - The annotation type of the annotation implementation class. Must not be null.
  • Method Details

    • on

      Appends the classes that this annotation applies to.
      Parameters:
      value - The values to append. Cannot be null or contain null elements.
      Returns:
      This object.
    • on

      Appends the classes that this annotation applies to.
      Parameters:
      value - The values to append. Cannot be null or contain null elements.
      Returns:
      This object.
    • onClass

      Appends the classes that this annotation applies to.
      Parameters:
      value - The values to append. Cannot be null or contain null elements.
      Returns:
      This object.
    • onClass

      Appends the classes that this annotation applies to.
      Parameters:
      value - The values to append. Cannot be null or contain null elements.
      Returns:
      This object.