Class AppliedAnnotationObject.BuilderM

Direct Known Subclasses:
BeanAnnotation.Builder
Enclosing class:
AppliedAnnotationObject

Builder for applied annotations targeting methods.

Adds method targeting capabilities to the base builder:

Example:

// Target specific methods Method method1 = MyClass.class.getMethod("myMethod"); Method method2 = MyClass.class.getMethod("otherMethod"); MyAnnotation annotation = MyAnnotation .create() .on(method1, method2) .build();

  • Constructor Details

    • BuilderM

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

    • on

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

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