001package sting.interceptors;
002
003import java.lang.annotation.Documented;
004import java.lang.annotation.ElementType;
005import java.lang.annotation.Retention;
006import java.lang.annotation.RetentionPolicy;
007import java.lang.annotation.Target;
008import javax.annotation.Nonnull;
009
010/**
011 * Marks an annotation type as an interceptor binding.
012 *
013 * <p>Interceptor bindings are applied to service interfaces, {@code @Injectable} implementation classes, or
014 * {@code @Fragment} provider methods. Sting resolves them at compile time and generates direct service-interface
015 * proxies.</p>
016 */
017@Documented
018@Retention( RetentionPolicy.CLASS )
019@Target( ElementType.ANNOTATION_TYPE )
020public @interface InterceptorBinding
021{
022  /**
023   * The canonical dotted name of the {@code @Injectable} interceptor implementation.
024   *
025   * <p>Leave empty only when a processor-path interceptor plugin claims the binding.</p>
026   *
027   * @return the canonical dotted name of the interceptor implementation.
028   */
029  @Nonnull
030  String implementedBy() default "";
031
032  /**
033   * The interceptor priority.
034   *
035   * <p>Lower priorities run outermost. Equal effective priorities for one intercepted service are compile errors.</p>
036   *
037   * @return the interceptor priority.
038   */
039  int priority();
040}