Class AppliedAnnotationObject.BuilderC

Enclosing class:
AppliedAnnotationObject

Builder for applied annotations targeting constructors.

Adds constructor targeting capabilities to the base builder:

Example:

// Target specific constructors Constructor<?> ctor = MyClass.class.getConstructor(String.class, int.class); MyAnnotation annotation = MyAnnotation .create() .on(ctor) .build();

  • Constructor Details

    • BuilderC

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

    • on

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

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