org.infinispan.protostream.config.AnnotationConfiguration Maven / Gradle / Ivy
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, ? extends AnnotatedDescriptor> 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, ? extends AnnotatedDescriptor> 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