All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.protostream.config.AnnotationConfiguration Maven / Gradle / Ivy

There is a newer version: 9.1.7.Final
Show newest version
package org.infinispan.protostream.config;

import java.util.Map;

import org.infinispan.protostream.AnnotationMetadataCreator;
import org.infinispan.protostream.descriptors.AnnotatedDescriptor;
import org.infinispan.protostream.descriptors.AnnotationElement;

/**
 * @author [email protected]
 * @since 4.0
 */
public interface AnnotationConfiguration {

   /**
    * The name of the annotation.
    */
   String name();

   AnnotationElement.AnnotationTarget[] target();

   Map attributes();

   AnnotationMetadataCreator metadataCreator();

   String repeatable();

   interface Builder {

      /**
       * Add a new attribute with the given name to the current annotation and return the builder to continue to
       * configure this attribute.
       */
      AnnotationAttributeConfiguration.Builder attribute(String name);

      /**
       * Attach a metadata creator for this annotation and return the same builder.
       */
      Builder metadataCreator(AnnotationMetadataCreator annotationMetadataCreator);

      Builder repeatable(String containingAnnotationName);

      /**
       * Create a new annotation with the given name and return its builder to continue configure it.
       */
      Builder annotation(String annotationName, AnnotationElement.AnnotationTarget... target);

      Configuration build();
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy